i need to receive an file through CURL in webpy
import web
import json
class GetFile:
def POST(self):
try:
i = web.input()
data = web.data()
except Error(e):
print e
I am not sure how to do this because there is no example to receive an data from CURL
curl -o -H "Content-type: text/xml; charset=utf-8" -T doc.xml "http://localhost:8080/get_file
I am getting an issue
HTTP/1.1 405 Method Not Allowed
Content-Type: text/html
Allow: GET
Transfer-Encoding: chunked
Date: Fri, 19 Oct 2012 11:54:13 GMT
Server: localhost
can any one give me an example code to upload an file through curl and save it in a location.