What is request.post and what is its function?

Asked

Viewed 729 times

-4

  • 1

    What function? The module/library is used to make http requests, such as Curl for example... https://medium.com/clebertech/howit works- uma-requisi%C3%A7%C3%A3o-http-cf76f66fe36e

1 answer

0


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

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’ll have the answer to that request.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.