-
-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Closed
Description
I am using this code to POST the data to Web API
var param = {
args: {
myStringVal: '979251e4-6c9f-460d-ba32-1b6fe58ce8a3'
}
};
axios({
method: 'post',
url: 'api/Application/Action/MyWebAPIMethod',
data: JSON.stringify(param),
});
and my Web API code is like this:
public class MyClassVM
{
public string myStringVal { get; set; }
}
public MessageVM MyWebAPIMethod(MyClassVM args){
// my code goes here
}
Issue is: When I pass the myStringVal: '979251e4-6c9f-460d-ba32-1b6fe58ce8a3' it gives me null in Web API [args.myStringVal = null ].
How can I pass the values in axios POST.
Thanks in advance
derekrpricehaithaison-cpu
Metadata
Metadata
Assignees
Labels
No labels