An alternative to HTTPClient Library

Hi,
I have been using the HTTPClient Library for some time, but recently I am having trouble every time I use it. The Photon would restart the second time a request is made and since the device attempts to make a request once every minute, it goes offline and back online every two minutes. This behaviour disappears when I comment off the line reading http.get(request, response, headers). Note that my project was working fine until I tried to improve it and started experimenting with arrays. When the problem started appearing, I restored a backup copy of my code that used to work, but it is not working now.
I tried to find an alternative to HTTPClient and I read about something called “rest” but the library does not feature in the Library list in the web IDE. The non web IDE does not work for me since it crashes every time I verify code.

Thanks

@osprey, I think you have been told in some of your other threads, that currently there is some underlying issue with the Photon system firmware that prevents the TCP stack to work correctly.
Particle is hard at work to solve this regression.

This means for you, that you have (roughly) three possibilities

  1. Wait for system firmware 0.4.7, or
  2. Downdgrade to system firmware 0.4.5, or
  3. Set up a local toolchain and rebuild the 0.4.6 firmware with some of the fixes that will be included in 0.4.7 in order to correct the issue
1 Like

OK. Did not realize that the 0.4.6 problems were related to the HTTP Client. Thanks!

Edit: Quick question, where can I follow the progress with the 0.4.7 update.

1 Like

Firmware milestones are provided on github - https://github.com/spark/firmware/milestones

I’d like to get 0.4.7 out before the end of this week.

2 Likes

Just in case this happens to someone else, a physical reset appears to break the cycle of the apparent reset that takes place every two minutes. Not ideal, but it will do until the release of 0.4.7.

Where can I find step by step instructions for applying version 0.4.7 with Particle CLI once it is out?

Thanks

Once it’s out the step-by-step usually gets linked in the release post, but it will just work the same way as the previous ones

e.g.
https://github.com/spark/firmware/releases/tag/v0.4.6.1
https://github.com/spark/firmware/tags

1 Like

Thanks!

1 Like