I would like to debug my Flask API. The API requires a JSON payload from a user. I am supplying that payload through Postman.I am using PyCharms debugger and am able to debug for a few seconds before Postman times out and the connection is lost and I must start again. I have already set request timeout to infinity
How can I maintain the connection in order to continue debugging?
Asked
Active
Viewed 326 times
0

Josh Zwiebel
- 883
- 1
- 9
- 30
-
1You could use the command line utility curl. – mechanical_meat Jan 30 '20 at 20:24
-
Could you expand on how that works and how it would solve the problem? – Josh Zwiebel Jan 30 '20 at 20:27
-
Look at this post for how to send JSON using curl: https://stackoverflow.com/questions/7172784/how-do-i-post-json-data-with-curl – mechanical_meat Jan 30 '20 at 20:33
-
Do you know of a solution using Postman – Josh Zwiebel Jan 30 '20 at 20:47
-
I don't, but judging from what's in the image maybe you should turn off SSL certificate verification since you're POSTing to a http:// address. Oh, and try adjusting the Request timeout. – mechanical_meat Jan 30 '20 at 20:56
-
I just tested and cURL has the same issue with timeout. I tried turning off SSL verification but no change – Josh Zwiebel Jan 30 '20 at 21:13
1 Answers
1
The timeout time for a given Flask app can be edited in it's given config property. Setting 'timeout' to the number of seconds you need before the request time's out will solve the issue.

Josh Zwiebel
- 883
- 1
- 9
- 30