HTTP POST request is not working(CustomerViewModel=null)
HTTP POST request is not working(CustomerViewModel=null)
I managed to register a customer.
HTTP POST request is not working.
But HTTP GET request which displays the current logged in Customer details in a View.
yes like this, [ "Number":07707070, "Desc": "kajas" ]
– iamkajas
Sep 16 '18 at 18:15
I added the request body and headers.
– iamkajas
Sep 16 '18 at 18:17
1 Answer
1
Your method expects an object of type CustomerViewModel but your client is sending an array of objects.
Change
[ "Number":07707070, "Desc": "kajas" ]
To
"Number":07707070, "Desc": "kajas"
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy
Can you add the request body and headers to your question ?
– Kalten
Sep 16 '18 at 18:15