How do I call a minimal API on a remote machine from a winform c# program?
Loading
How do I call a minimal API on a remote machine from a winform c# program?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tahir AnsariPosted Aug 3, 2023, 3:33 AM
Try below example
1) Add HttpClient to your WinForms Project: In your WinForms C# project, add a reference to
System.Net.Httpby right-clicking on the project, selecting "Manage NuGet Packages,"2) Write Code to Call the Remote API: In your WinForms code, you can use the
HttpClientclass to call the remote API.Cr BhargaviPosted Aug 3, 2023, 1:08 AM
To call a minimal API on a remote machine from a WinForms C# program, you can use the
HttpClientclass to make HTTP requests to the API endpoint