Guest User

Untitled

a guest
Jan 21st, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. // The Controller Action when data is posted in the Uri:
  2.  
  3. // POST: api/PostUri
  4. [HttpPost]
  5. [ActionName("PostUri")]
  6. public Result Post([FromUri]Data data)
  7. {
  8. // Do something..
  9. }
  10.  
  11. // The Controller Action when request is posted with data in the Body:
  12.  
  13. // POST: api/MyController/PostBody
  14. [HttpPost]
  15. [ActionName("PostBody")]
  16. public Result PostBody(Data data)
  17. {
  18. return Post(data);
  19. }
Add Comment
Please, Sign In to add comment