Feb 04, 2019 02:01 PM|cenk1536|LINK
I created a web api project and here is my controller below. I am trying to make postman POST request call to this controller which has x-www-form-urlencoded values in the body.
public class GameController : ApiController
// POST: api/Game
public async System.Threading.Tasks.Task PurchaseInitiationAsync([FromBody]string value)
HttpClient httpClient = new HttpClient();
HttpContent content = new StringContent(value);
HttpResponseMessage response =
await httpClient.PostAsync("https://test.game.com/purchaseinitiation", content);
string statusCode = response.StatusCode.ToString();
I would like to get this JSON request body and make another call to URI. But content is NULL. How can I achieve to send JSON to the URI?