'Request from flask app running on remote server from local via ssh
Hi I am running my flask app on some server, which is on http://localhost:8000/. The server and my local machine have different network. I built a ssh connection on my local machine with command below to establish the ssh tunnelling.
ssh -D 8123 -f -C -q -N username@remotesrrver
Right now I want to run python script to request some information from my flask app on the server, but I am not sure how I should specify the url.My IP address is 192.168.2.161 for example. I am pretty new to this and below is how I requested. It gave me "[WinError 10061] No connection could be made because the target machine actively refused it".
response = requests.post ("http://192.168.2.161:8123/localhost:8000/summarize_data?username=john&password=hello")
Could anyone suggest the correct way to send the request? Thank you so much for the help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
