Guest User

Untitled

a guest
Feb 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import argparse
  2. import io
  3. import os
  4. import sys
  5. import base64
  6. import requests
  7.  
  8.  
  9. def read_file_bytestream(image_path):
  10. data = open(image_path, 'rb').read()
  11. return data
  12.  
  13.  
  14. if __name__== "__main__":
  15. data=read_file_bytestream("testimg.png")
  16. requests.put("http.//0.0.0.0:8080", files={'image': data})
Add Comment
Please, Sign In to add comment