Answer the question
In order to leave comments, you need to log in
How to pass Request Payload to request?
The very essence: I'm trying to make a bot for buying on this site. To buy a thing, you need to make such a request, but I don’t know how to send Request Payload. I read the documentation, it didn’t really help, I would like any example to understand. Here is the screenshot:
Answer the question
In order to leave comments, you need to log in
payload = {
"game": "csgo",
...
}
r = requests.post('xxx.com', data=payload)
If you are using requests, then the requests.post function has an optional data parameter, which contains the request payload.
An example from the documentation for passing JSON to payload:
payload = {'key1': 'value1', 'key2': 'value2'}
r = requests.post("https://httpbin.org/post", data=payload)
print(r.text)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question