Does anyone know how to pass in Body (raw) of an API using C# code? I am testing my API using Postman. For this particular url, I will need to insert a Body to get an output. I am not sure how do I pass in the Body using C# code.
This is my code in C# to retrieve the data from the url, it works perfectly fine.
var httpClient = new HttpClient();
var response = await httpClient.GetStringAsync(url);
This is just an example. With my own url and body, when I click Send, there will be an output shown. So how do I pass in the body text in C#?