Long story short: HttpClient appears unreliable when wifi signal is weaker, but flashing the firmware works just fine, and my computer on the same network works just fine. Anything I should do to narrow down the problem or improve it?
More details:
Downstairs closer to my router, WiFi.RSSI() is around 50, and POST calls via HttpClient are reliable 100% of the time.
Upstairs where wifi is weaker, e.g. WiFi.RSS() is around 75, requests made with HttpClient seem to work about 25% of the time, and most often result in a response code of -1. Logs indicate it connected, but then no response is received. The same thing happens with multiple remote servers, so it’s definitely a client side problem. What’s really strange about this, though, is that I never have problems flashing the firmware in this room, and my laptop wifi works just fine.
I haven’t yet tried it extensively, but anecdotally Spark.publish() always works just fine.
I’m worried there may be a fundamental difference between the underlying network libraries, where HttpClient is inherently less resilient and fails to do some additional checks.
Any ideas what might be going on?