Reputation: 11
Folks,
I am new to python and working on REST API in python. I am facing issue in below scenario where I don't understand how to pass the parameter.
Request URL:URL/xyz/api/pqr/
Request method:POST
Params - "test"
Response - {"apps":[], ...., "users": []}
I tried standard ways of passing parameter in json and directly to URL but did not work.
edit - I was searching on this and came across this URL - Parameter Binding in Web API
Following is a valid HTTP POST request in the fiddler for the above action method.It is for .net platform but I don't see same option in python. Is there any way we can do it in python?
Thanks, Prashant
Upvotes: 1
Views: 1727
Reputation: 930
Use request package like
import requests
r = requests.post('/xyz/api/pqr/', params=Params)
Upvotes: 0