arduino-libraries / ArduinoHttpClient

Arduino HTTP Client library
288 stars 172 forks source link

Content-Length returns 0 from Godaddy #94

Open grichfitz opened 4 years ago

grichfitz commented 4 years ago

Hello, Can anyone help with a weird issue with ArduinoHttpClient

I do the following, to get responseBody() directly into a char [].

int httplength = http.contentLength() +1;
char responsebody[httplength];
http.responseBody().toCharArray(responsebody, httplength);

This works fine on my homegrown, raspberry pi Apache server.

This fails on my godaddy server, I do not get contentLength(), it returns nothing.

It works on Postman and I get all my info.

I think it maybe solved if I could use http/1.0, but I cant seem to force ArduinoHttpClient to do this.

Has anyone else had a similar issue, or could point me in the right direction?

Thanks for any help!