What is request.post and what is its function? [closed]

-4

I'm studying python and I came across such a method, but even reading the documentation I still do not understand. Thank you very much in advance. The python documentation you were reading

    
asked by anonymous 26.02.2018 / 18:01

1 answer

0

Through request.post you send information to an endpoint to be processed and return a response.

Example:

import requests

API_ENDPOINT = "http://teste.com/api/api_post"

data = {'code':'python'}

r = requests.post(url = API_ENDPOINT, data = data)

In r, I will have the answer to this request.

    
26.02.2018 / 20:45