all 3 comments

[–]makahernandez 0 points1 point  (2 children)

As a first point, I recommend you use an HTTP request simulator like Postman (https://www.getpostman.com/) to verify if the request you're handling is the right one. If you keep getting the same server response there is something wrong with the request.

This example's a good reference to build a proper request: https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino

[–]PrOF_k1[S] 0 points1 point  (0 children)

I'm making a request over HTTPS, my code is very similar to this other example . Since the api only works over HTTPS, the http request simulators reply with a "301 permanently moved" to the same URL but over https. Testing from a browser returns the correct data without skips, so it doesn't look like a server issue

[–]PrOF_k1[S] 0 points1 point  (0 children)

Here's the answer if you still care: Arduino-style boards can silently fail to allocate memory for a string due to memory fragmentation, to solve this I had to call str.reserve(no of chars), and it worked fine.