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

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -