kuma-mon
Arch-Supremacy Member
- Joined
- Apr 16, 2017
- Messages
- 10,488
- Reaction score
- 5,205
Read Timeout - 30s
Connect Timeout - 5s
Capture the exceptions inside try..catch blocks and react to them appropriately. Below is a fragment of code for your reading. You are advised to read your http response in blocks of bytes rather than line by line. It's more consistently efficient then line by line. Remember http response is one complete stream of bytes. Lines are your own interpretation to "\r
", you don't need to respect that if your purpose is not to process line by line.
Between what kind of HTTP request it is, you can choose if you want to retry or not. If you feel some actions are better to notify the user for further actions, then don't retry those and let the user decide.
okay thanks so much, i wil have a look at the code and understand.
well actually the reason why i need read/print line by line is because i have to get the error code hwz returns. if lets say user inputs more than 8 images, hwz will reject his post. the error is shown in the body section which is far down. but yea i understand i can improve the way i read this hmmm.
