+ 1
GET and POST requests using Python
Please i need some insight on this Explain to me as if i'm a dummy
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 :)
0
Thank you
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.