python - pycurl equivalent of "curl --data-binary" -
I want to know the equivalent of this curl command in pycurl:
curl - data - Binary @ binary_data_file.bin 'http: // server / myapp / method' Note: The above curl statement uses the post method. I have to use it for compatibility with my server script.
request library means that to keep these simple things: / P>
import request r = requests.post ('http: // server / myapp / method', data = {'aaa': 'bbb'}} < P> or dependent end data: import request r = requests.post ('http: // server / myapp / method', data = file ('binary_data_file. Bin ',' rb ') Read ())
Comments
Post a Comment