0

I'm completely new to .NET and C# programming. I'm working on a project that requires me to develop a .NET base web application.

I have been able to do most parts of the project but I'm having issues with the ASP.NET Core Web API.

I want to make HTTP Get request from the front end but I do not know how to remove the WeatherForecast sample and write my own requests and response.

Any help regarding how to create the basic template for the HTTP requests would be highly appreciated.

Thank you!

1
  • You can use this Microsoft documents Link Commented Oct 6, 2022 at 19:19

1 Answer 1

1

I want to make HTTP Get request from the front endWeb api doesn't contain front end.If you want to send requests in web api,you can try to use HttpClient,here is a sample with get request:

HttpClient client = new HttpClient();
 HttpResponseMessage response = await client.GetAsync("{url}");

For more details,you can refer to the doc.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.