If I offer a POST in my REST API, say like
https://api.myservice.com/myresource
and I want to accept a complex JSON string/object from within the POST.
Should I
-
omit the JSON and map the entire object to the URL (which would be quite uncool)
-
add the JSON Data as key => value pairs to the JSON
-
am I able to just access the raw body data or wouldn’t that be any more restful?
When you do
POSTto the URLhttps://api.myservice.com/myresourceyou would be creating amyresourcewith the details in thePOSTbody. The URL generally should contain your resources.