[RFC] New HTTP API


Jukka Rissanen
 

Hi all,


I have sent a proposal for a new HTTP API at https://github.com/zephyrp
roject-rtos/zephyr/pull/4243 so in order to get more comments and
feedback I am sending this mail.

The PR#4243 introduces a new HTTP API that differs a bit from the
current HTTP API:

* The new API is built on top of net-app API. This means that HTTPS
support can be removed from HTTP library as that is already provided by
net-app API. This will save some memory as almost duplicate code in
net-app and current HTTP API can be removed.

* Timeout handling is removed from HTTP API as that was cumbersome to
use and it should be handled by application anyway.

* Server HTTP handler callbacks are defined and handled differently
compared to current API.

* Current version in PR#4243 is still missing HTTP client API but I
will add that before the old API is removed.

* The PR#4243 still has the old HTTP API as is but it would be
removed/deprecated in next version of that patch set.

* Related PR#1271 adds websocket support that is built on top of this
new HTTP API. There is also PR#1311 that will then add console over
websocket support, this would mean that it would be possible to have
console in your HTTP browser.

I looked if it would be possible to keep the current HTTP API but there
were many changes needed so the new API is not compatible with it.
Changes are not too big but modifications are needed in application
side.

Feedback/comments?


Cheers,
Jukka

Join devel@lists.zephyrproject.org to automatically receive all group messages.