December 2018
Beginner to intermediate
796 pages
19h 54m
English
In Chapter 13, Creating API Views, when we composed and sent POST and PUT commands, we had to use the use the -H "Content-Type: application/json" option to indicate curl to send the data specified after the -d option as application/json. We had to use this option because the default content-type in curl is application/x-www-form-urlencoded.
Now, our RESTful Web Service goes beyond JSON and it can also parse application/x-www-form-urlencoded and multipart/form-data data specified in the POST and PUT requests. Hence, we can compose and send a POST command that sends the data as application/x-www-form-urlencoded.
We will compose and send an HTTP request to create a new toy. In this case, we will use the ...
Read now
Unlock full access