Skip to content

Instantly share code, notes, and snippets.

@SunRunAway
Created June 27, 2013 01:54
Show Gist options
  • Save SunRunAway/5873389 to your computer and use it in GitHub Desktop.
Save SunRunAway/5873389 to your computer and use it in GitHub Desktop.
import requests
requests.post("http://localhost:12306/post",
files={
'key': ('filename', open('file', 'rb')),
},
data={"field1":"x", "field2":"y"},
)
qiniu.rpc.Client("localhost:12306").call_with_multipart("/post", [("field1", "x"), ("field2", "y")], files = [("file", "key", "data")])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment