I'm very new to web2py
and to web-requests so please keep a slack hand. I try to make application with web2py
framework that allow me to do following:
I send POST request to remote server (server's url, for example, is https://100.100.10.100
)
headers = {'Content-type': 'application/json'}
payload = {"uuid": some_file.json,
"level": "public",
"Url": " http://localhost:8000/myApp/default/file_to_process}
requests.post('https://100.100.10.100', data=json.dumps(payload), headers=headers)
Server receives request and with counter GET request tries to get data from some_file.json
that located on my hard drive in /home/user/Desktop/some_files
and linked with web2py
application's page http://localhost:8000/myApp/default/file_to_process
with below code
Controller:
def file_to_process():
return dict(files=Expose('/home/user/Desktop/some_files'))
View:
{{=files}}
The problem is that server can receive only first string from file but not the whole data range... I can't understand where should I search for a mistake: in web2py
code or in Python requests
POST request.
Please make your suggestions or provide a solution.