Horje
send arrays over POST by Python requests library Code Example
send arrays over POST by Python requests library
import requests
url= "path/to/api"
# Final Payload -> payload = {'key1': 'value1', 'key2': 'value2', 'keys[0]': 's1', 'keys[1]': 's2', 'keys[2]': 's3', 'keys[3]': 's4', 'keys[4]': 's5'}
keys=['s1','s2','s3','s4','s5']
data={'key1': 'value1', 'key2': 'value2', 'keys[]': keys}
r = requests.post(url, data)
res = r.json()
print(res)




Python

Related
how to set geometry to full screen in pyqt5 Code Example how to set geometry to full screen in pyqt5 Code Example
dict from group pandas Code Example dict from group pandas Code Example
Generate random numbers following Poisson distribution, Geometric Distribution, Uniform Distribution, and Normal Distribution, and plot them Code Example Generate random numbers following Poisson distribution, Geometric Distribution, Uniform Distribution, and Normal Distribution, and plot them Code Example
AttributeError: Can't get attribute on <module '__main__' from manage.py Code Example AttributeError: Can't get attribute on <module '__main__' from manage.py Code Example
22 Code Example 22 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7