+ 1

GET and POST requests using Python

Please i need some insight on this Explain to me as if i'm a dummy

26th Sep 2021, 6:57 PM
Obinna
Obinna - avatar
3 ответов
+ 3
you can make http request with the request library here is an example: import requests res = requests.get("https://httpbin.org/get") print(res.status_code) print(res.json()) for a post request, just use requests.post() instead of requests.get() the requests library needs to be installed with pip: pip install requests I hope this helps :)
26th Sep 2021, 8:52 PM
Apollo-Roboto
Apollo-Roboto - avatar
0
Thank you
26th Sep 2021, 9:20 PM
Obinna
Obinna - avatar
0
GET is used to request data or to receive data such as requesting a youtube video while POST is meant to securely send data such as login or register submit form.
27th Sep 2021, 9:01 AM
iTech
iTech - avatar