Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How to call WEB API Post method using HttpClient

$
0
0

Hi,

I'm trying to call the following WEB Api POST method from a .net console application but can't seem to get it to work.

Could someone please provide some code for calling this POST method using HttpClient. Thanks heaps!

[Produces(typeof(WorkItemModel))]
[HttpPost("Create/{category1Id}/{category2Id}/{category3Id}")]public IActionResult Create([FromRoute]string site, int category1Id, int category2Id, int category3Id, [FromBodyKeyValuePair<stringobject>[] fieldValues)

Viewing all articles
Browse latest Browse all 9386

Trending Articles