ArduinoJson icon indicating copy to clipboard operation
ArduinoJson copied to clipboard

Feature Request: Support chucked data streams to better support HTTP1.1 clients

Open GeorgeKerwood opened this issue 2 years ago • 5 comments

Firstly, many congratulation on, and thanks for, your fantastic project! It's been a great help to me and I much enjoyed the book which has improved invaluable alongside.

I would humbly request that you consider supporting the chunked transfer encoding of http 1.1 client streams. I have recently completed a project deploying WiFiNina on an Arduino Nano 33 IoT which integrates a NINA W-102 WiFi. Since the library does not support http 1.0 degradation, a very large part of the work effort was preparing various REST API responses to "load" the JSON content to buffers prior to deserialization.

Many Thanks,

George

GeorgeKerwood avatar Aug 24 '21 11:08 GeorgeKerwood

Hi George,

I will add a new decorator in the StreamUtils library, but I'm very busy at the moment, so I cannot give any ETA.

When you say "the library does not support http 1.0 degradation", which library are you talking about?

Best regards, Benoit

bblanchon avatar Aug 25 '21 07:08 bblanchon

Salut!

Thanks for the reply. Great, no particular hurry, my project is concluded for the time being I'd just thought it would make a useful addition.

"The library" in this case was WiFiNina. Unless of course it was just that I couldn't discover how to do so. A further caveat had been that Postman, which I had been using to prepare and test my requests, also does not support http 1.0 so the debugging/testing on the embedded side would of been considerable longer with that limitation.

Your hard work is apricated, Best Regards, George

GeorgeKerwood avatar Aug 25 '21 07:08 GeorgeKerwood

Hi George,

As far as I can see, WiFiNina only works at TCP/UDP level and doesn't provide any HTTP abstraction. I don't see how it could force you to use HTTP 1.1.

Best regards, Benoit

bblanchon avatar Aug 26 '21 07:08 bblanchon

Hi Benoit,

You're right. In my inexperience I misdiagnosed the "http 1.0 isn't working" problem as WiFiNina problem and not an endpoint problem (which I now think it is). I'll take another look to see if I can't remove the need for preloading buffer arrays.

Thanks for the input,

George

GeorgeKerwood avatar Aug 26 '21 09:08 GeorgeKerwood

Hi George,

I never saw a server that refuses to downgrade to HTTP 1.0. Please let me know if that’s your case.

Best regards, Benoit

bblanchon avatar Aug 27 '21 07:08 bblanchon