|
@@ -18,7 +18,7 @@ class AutoWebsiteUpdate:
|
|
|
|
|
|
|
|
|
|
|
|
|
def process_post_request(self, request, *args, **kwargs):
|
|
def process_post_request(self, request, *args, **kwargs):
|
|
|
- print("Received request:\n"
|
|
|
|
|
|
|
+ stringData = "Received request:\n"
|
|
|
+ "Method: {}\n".format(request.method)
|
|
+ "Method: {}\n".format(request.method)
|
|
|
+ "Headers: {}\n".format(request.headers)
|
|
+ "Headers: {}\n".format(request.headers)
|
|
|
+ "Args (url path): {}\n".format(args)
|
|
+ "Args (url path): {}\n".format(args)
|
|
@@ -28,8 +28,10 @@ class AutoWebsiteUpdate:
|
|
|
if int(request.headers.get("Content-Length", 0)) > 0
|
|
if int(request.headers.get("Content-Length", 0)) > 0
|
|
|
else""
|
|
else""
|
|
|
)
|
|
)
|
|
|
- )
|
|
|
|
|
- return
|
|
|
|
|
|
|
+ writer = open(r'reveived_data.txt','w')
|
|
|
|
|
+ writer.write(stringData)
|
|
|
|
|
+ writer.close()
|
|
|
|
|
+ return "received"
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|