c# - WebAPI passed post parameters is null -


I'm testing with WebAPI 2 and I've created the following control method.

  // Post API / value public string post ([CBD] string value) {string returnValue = "Return:" + value; Return return value; }  

When I am posting the following message with Fiddler, the return method parameter returns.

  POST http: // localhost: 50814 / api / value / http / 1.1 host: localhost: 50814 Content-Type: Application / Jason Content-Length: 14 {value: "new"}  

I have already done my code as much as before but it still remains empty.

I think I am looking very simple but I am out of ideas Can someone help me?

If you use a simpler string than your controller's post method, only Try sending it to:

  POST http: // localhost: 50814 / API / Value / HTTP / 1.1 Host: Localhost: 50814 Content-Type: Application / Jason Content-Length: 10 " MyStrin " 

Comments

Popular posts from this blog

eclipse plugin - Run java code error: Workspace is closed -

ios - How do I use CFArrayRef in Swift? -

scala - Play Framework - how to bind form to a session field -