March 2019
Beginner
490 pages
12h 40m
English
When working with forms, it is useful to use the POST method to send data to the server. The POST method is used for submitting user input from HTML forms and for uploading files to a server.
When using POST, the data that we wish to send will go in the body of the request. We can put any bytes data in there and declare its type by adding a Content-Type header to our request with an appropriate MIME type.
Let's look at an example for sending some HTML form data to a server by using a POST request, just as browsers do when we submit a form on a website. The site at https://httpbin.org offers a test server that returns certain data from requests. It will be used to exemplify some uses of the Requests module.
In the ...
Read now
Unlock full access