# Http post crashes code

**URL:** <https://community.particle.io/t/http-post-crashes-code/68625>\
**Category:** Firmware\
**Tags:** electron\
**Created:** [November 14, 2024, 9:53am UTC](https://community.particle.io/t/http-post-crashes-code/68625 "2024-11-14T09:53:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![why](https://avatars.discourse-cdn.com/v4/letter/w/4bbf92/32.png) [@why](https://community.particle.io/u/why)\
**Post date:** [November 14, 2024, 9:53am UTC](https://community.particle.io/t/http-post-crashes-code/68625/1 "2024-11-14T09:53:53Z")

</div>

Hi,  
i've have working code performing a http.get and post on a photon running 3.3.1, when compiling for electron 3.3.1 the "get" works but arriving at the first "post" the electron just crashes.  
Does anyone have an idea where to look.  
Thanks in advance  
Erik

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [November 14, 2024, 9:59am UTC](https://community.particle.io/t/http-post-crashes-code/68625/2 "2024-11-14T09:59:01Z")

</div>

Which HTTP library are you using?

---

<div class="post-metadata">

**Author:** ![why](https://avatars.discourse-cdn.com/v4/letter/w/4bbf92/32.png) [@why](https://community.particle.io/u/why)\
**Post date:** [November 14, 2024, 10:53am UTC](https://community.particle.io/t/http-post-crashes-code/68625/3 "2024-11-14T10:53:11Z")

</div>

Hi,  
I because I remarked a small difference in length of the files I just replaced my files with the ones from  
[https://github.com/nmattisson/httpclient](https://github.com/nmattisson/httpclient)

> [![](https://opengraph.githubassets.com/982424a899a47db3c70a59366b483448dc7a3fe19c45b1ff4553b8cb90933eba/nmattisson/HttpClient)](https://github.com/nmattisson/httpclient)  
> |   
> [GitHub - nmattisson/HttpClient: Http Client Library for the Spark Core (also well suited for Arduino and other embedded platforms).](https://github.com/nmattisson/httpclient)  
> Http Client Library for the Spark Core (also well suited for Arduino and other embedded platforms). - nmattisson/HttpClient  
> [github.com](http://github.com)  
> |
> 
> - | - |

After compiling and flashing I still have a crash on the first post from the electron. (I will try the photon this later on, but expect it will work).  
Regards,  
Erik

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [November 14, 2024, 10:56am UTC](https://community.particle.io/t/http-post-crashes-code/68625/4 "2024-11-14T10:56:46Z")

</div>

What does your code for setting the body look like? Actually all of your code would be better if you can share it.

---

<div class="post-metadata">

**Author:** ![why](https://avatars.discourse-cdn.com/v4/letter/w/4bbf92/32.png) [@why](https://community.particle.io/u/why)\
**Post date:** [November 14, 2024, 1:31pm UTC](https://community.particle.io/t/http-post-crashes-code/68625/5 "2024-11-14T13:31:34Z")

</div>

Hi,

as I can not share the code, I wend back to the basics to provide a minimal example. Strangely enough here the post using electron works as well as on photon.  
If I do find the issue causing the hard fault on electron, I'll let you know.

Thanks for your time,  
best regards,  
Erik

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/2/3291e3c9351789fe8620ae5bcec8d3fec67ff221.png) [@system](https://community.particle.io/u/system)\
**Post date:** [May 16, 2025, 1:31am UTC](https://community.particle.io/t/http-post-crashes-code/68625/6 "2025-05-16T01:31:50Z")

</div>

Closed on May 16, 2025, 1:31am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
