asp.net - Cannot post object from .net Client web-api web service -
i have 1 .net client tries make http request web api service here request: public list<category> getcategories() { httpclient client = new httpclient(); client.baseaddress = new uri("http://localhost:54558/"); client.defaultrequestheaders.accept.add(new mediatypewithqualityheadervalue("application/json")); task<string> response = client.getstringasync("api/categoryapi/"); list<category> lstcategory = jsonconvert.deserializeobjectasync<list<category>>(response.result).result; return lstcategory; } public void create(category category) { client.defaultrequestheaders.accept.add(new mediatypewithqualityheadervalue("application/json")); var stringcontent = new stringcontent(category.tostring()); httpresponsemessage responsemessage = client.postasync("api/categoryapi/", stringcontent).result; } and ...