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

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -