Answer the question
In order to leave comments, you need to log in
How to properly pass data to ASP.NET?
There are two types of data transfer: through JObject and using routing.
Example:
/api/user/add/{name}/{age}/{salary}
post(string name, string age, string salary)
{}
and second:
/api/user/add
post(JObject obj)
{
Parse obj
}
Help to understand what method is correct to use.
Answer the question
In order to leave comments, you need to log in
https://docs.microsoft.com/en-us/azure/architectur...
/api/user for
more HTTP verbs.
For POST, PUT data will be in the body of the request.
For GET, DELETE the data will be in the URL.
No need to write
/api/user/add
/api/user/1/rename
/api/user/1/delete
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question