Category : postman

I am managing an app built by third parts in python. I have this url dispatcher urls += [(r’/path/objectA/(.*)’, ObjectAHandler)] # this was made by third parts, it is expected to work and this class class ObjectAHandler(BaseHandler): def __init__(self, application, request, **kwargs): super(ObjectAHandler, self).__init__(application, request, **kwargs) # do the init of the basehandler @gen.coroutine def ..

Read more

Below is an image attached of a POST request using the POSTMAN application. How do I achieve the same using Python Requests? my code does not get the job done URL = " https://111.111.111.111/abc" fp = ("FILEPATH") file = {"File": open(fp, ‘rb’) } UPLOAD = requests.post(URL, verify= False, cookies=coks, files=file) response_UPLOAD = requests.get(URL, verify= False, ..

Read more

I’m trying to use request.get_json() to add nodes from JSON data to a set. @app.route(‘/connect_node’, methods = [‘POST’]) def connect_node(): json = request.get_json() nodes = json.get(‘nodes’) if nodes is None: return "No node", 400 The snapshot of the Postman POST request The error I’m getting in Spyder(Python 3.9): line 178, in connect_node nodes = json.get(nodes) ..

Read more

Body I’m trying to send: update_request={ "id": "f07de0a44c2911ea8fb2bc764e10b970", "user": { "user": "3491574055045", "timestamp": "1640049459", "signature": "YQvl1dWkN6MrHQ8xGwEQndVo2QdPSzc6EqLJslzNjy4%3D", "code": "test" } } This is my code right now: url = "https://api.ordergroove.com/customer/update_customer" headers = { ‘content-type’: ‘application/json’ } body = """ update_request={{ "id": "f07de0a44c2911ea8fb2bc764e10b970", "user": { "timestamp": "1640049459", "signature": "YQvl1dWkN6MrHQ8xGwEQndVo2QdPSzc6EqLJslzNjy4%3D", "code": "test" } }} """ #Send and print ..

Read more

im currenty doing some work for school; i have a flask app and some postman tests that i have to pass, one of which requests an array of dicts (something like [{dict1}, {dict1},..]) ive been trying to return this: result = [{ "reservationUid": data["reservationUid"], "status": data["status"], "startDate": data["startDate"], "tillDate": data["tillDate"], "book": book_data, "library": library_data }] ..

Read more