Pinku

Pinku

  • 1.4k
  • 302
  • 45.2k

How to POST Request using Postman with visual studio

Jun 24 2020 5:49 AM
static List<string> strings = new List<string>()
{
"value0", "value1","value2"
};
// POST api/values
public void Post([FromBody]string value)
{
strings.Add(value);
}
i am trying to learn api with postman
above is the code . How to POST Request using Postman . i have added the
url : https://localhost:44339/api/values
Header: Content-Type: application/json
Body : "New value" 

Answers (2)