0

So i realize this might have something to do with me not understanding how local IPs work, but lets say my computer is running on the public ip: xxx.xxx.xx.xx

And I have this flask code:

from flask import Flask, request
app = Flask(__name__)
@app.route('/testingdata', methods=['POST'])
def result():
   print(request)
   print(request.form['DevEUI_uplink'])
   return 'Received !'

if __name__ == '__main__':
   app.run(host = '0.0.0.0', debug=True, port=5000)

This lora plataform is able to send POST data to an URL which I managed to do so to Beeceptor whereas the data came out like this:

{"DevEUI_uplink": {"Time": "2018-10-19T13:15:17.531+00:00","DevEUI": "xxxxxxxxxxxxxxxx","FPort": 18,"FCntUp": 4,"ADRbit": 1,"MType": 4,"FCntDn": 4,"payload_hex": "7b2274656d7065726174757265223a32337d",...}}

But when I try to point the URL to xxx.xxx.xx.xx:5000/testingdata, nothing gets there.

I welcome any newbie friendly knowledge on this since I've been on and off at this for a while.

Edit 1: Thank you for the hosting tip, still doesn't work tho.

BryceSoker
  • 624
  • 1
  • 11
  • 29
  • Does your server behave as intended when you're calling it with your browser/curl/httpie/any other tool? – Slam Oct 19 '18 at 14:20
  • With browser, http://127.0.0.1:5000/testingdata, basically returns 405 error, which I assumed it's normal since I'm basically just trying to get requests. As for the console it simply gives off: 127.0.0.1 - - [19/Oct/2018 15:23:39] "GET /testingdata HTTP/1.1" 405 - – BryceSoker Oct 19 '18 at 14:24

0 Answers0