import requests import json import flask sentence = 'Hey! Thanks for the ans, but i think i wasnt clear enough about what i need to do.\ I having for example, one computer running the servers script, and another computer runnig client script.\ The client need to send a true var for if he is alive and this need to be an http request, \ so i dont really have a url, just an ip address' #r = requests.post('localhost:5702/post', data=sentence) #print(r.text) app = flask.Flask(__name__) @app.route('/test/', methods=['GET', 'POST']) def index(): data = json.loads(flask.request.get_json()) print(data['data']) print(data) data = data+' processed!' return flask.jsonify(data) app.run('localhost', 8888) resp = requests.post('localhost:8888', data='this is a test')