Closed IanMercer closed 9 years ago
This looks good! I will merge as soon as I can test later. Thanks!
I had to remove the following lines from your patch:
if (!client.available()) {
HTTP_DEBUG_PRINT("HTTP: client no longer available\n");
return code;
}
When they had been in there, connection was dropped too early sometimes.
@mschaeuble Thanks for a great library. Awesome for an Arduino beginner :) I have a rails app responding to a post request. Local everything works fine, but when deployed on Heroku the Arduino hangs. In debug mode I see that HTTP_DEBUG_PRINT(".") is just spitting out '.' forever. The code above that you removed fixed the problem for me. Haven't done very many tests, but so far I have not had a problem with the connection closing to early.
Thanks for the commit @IanMercer i'm going to manually make the change @mschaeuble suggested.
Add a setContentType method and preserve the existing default value Fix readResponse to return the whole of the response not just the first line Fix: Once in the httpBody you don't need to keep looking for the blank line