nmattisson / HttpClient

Http Client Library for the Spark Core (also well suited for Arduino and other embedded platforms).
Other
121 stars 150 forks source link

IChunkStream interface and post from stream #36

Open otzy opened 7 years ago

otzy commented 7 years ago

when POST body is a big one, my spark core goes flashing red and reboots. Unfortunately we don't have enough memory in this controller. If you have already, for example a numeric array to send to your server, you can build request body on the fly using smaller chunks, thus avoiding out of memory error. @nmattisson, if you are intersted in the further development of this library, I can commit an example of ChunkStream. Also HttpClient::request methods need some refactoring I think.

Stabitha commented 7 years ago

Go for it. We're all just rolling our own kludgy fixes for this issue at the moment.

On Sun, Feb 19, 2017 at 12:02 PM, Evgeny Mazovetskiy < notifications@github.com> wrote:

when POST body is a big one, my spark core goes flashing red and reboots. Unfortunately we don't have enough memory in this controller. If you have already, for example a numeric array to send to your server, you can build request body on the fly using smaller chunks, thus avoiding out of memory error. @nmattisson https://github.com/nmattisson, if you are intersted in the further development of this library, I can commit an example of ChunkStream. Also HttpClient::request methods need some refactoring I think.

You can view, comment on, or merge this pull request online at:

https://github.com/nmattisson/HttpClient/pull/36 Commit Summary

  • IChunkStream interface and post from stream

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nmattisson/HttpClient/pull/36, or mute the thread https://github.com/notifications/unsubscribe-auth/AHdubcgEKfH-kCDYe-fi4BHleoeDUodyks5reJHTgaJpZM4MFjkQ .