연구 자료/Programming

[Python] http post request

단디연구소 2016. 1. 5. 13:54

이런 저런 모듈 엄청 쓰다가 간단하게 쓸수 있는 모듈이 있었다.. 제길



#파일 전송용 코드


import requests


def sendFile(url,path):

r = requests.post(url, files={'files[]': open(path, "rb")})

return r.text