Jun-05-2020, 08:38 PM
Hi.
I replicated this in my own environment and as said your GET when you invoke the request is received by your api code which then tries to retrieve the body of the request (line 20 first code set)but the second parameter for requests.get package is request parameters aka ?x=12345 style query parameters,if as i suspect you wish to post the dictionary data in the second code set then the request needs to be a post method, this then is retrieved by the code on code set 1 line 20, and although failed for me the rest of the logic, it does return to the "r" variable the response code from flask, in my case HTTP 500, but worked to a fashion.
I replicated this in my own environment and as said your GET when you invoke the request is received by your api code which then tries to retrieve the body of the request (line 20 first code set)but the second parameter for requests.get package is request parameters aka ?x=12345 style query parameters,if as i suspect you wish to post the dictionary data in the second code set then the request needs to be a post method, this then is retrieved by the code on code set 1 line 20, and although failed for me the rest of the logic, it does return to the "r" variable the response code from flask, in my case HTTP 500, but worked to a fashion.
Regards
-------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.”
-------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.”