Commit Graph

17 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
b8fd862965 webclient: Add some assertions on webclient_context state 2021-08-08 22:34:26 -07:00
YAMAMOTO Takashi
cb1f7c9dfe webclient.h: Document webclient_client lifetime 2021-08-08 22:34:26 -07:00
YAMAMOTO Takashi
0bae950b63 webclient: Implement non-blocking I/O
* webclient_perform
    * Add a new flag to use non-blocking mode (WEBCLIENT_FLAG_NON_BLOCKING)
    * Implement restarting

* Add a few associated API functions
    * webclient_get_poll_info: get the descriptor info for poll/select
    * webclient_abort: abort the operation (instead of restarting)
2021-08-08 22:34:26 -07:00
Gustavo Henrique Nihei
a1026c9f23 netutils/webclient: Notify HTTP header data via dedicated callback
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-07-23 11:28:26 -07:00
YAMAMOTO Takashi
ce2b9519a7 webclient: Add a way to specify timeout 2021-06-15 05:18:14 -05:00
YAMAMOTO Takashi
1131cbe14d webclient: Implement AF_LOCAL 2021-01-17 18:44:17 -08:00
YAMAMOTO Takashi
73fb7baa05 webclient: Distinguish request size and buffer size in body callback
This fixes the case when webclient_set_static_body is used
for data larger than webclient_context::buflen.

Note: as of writing this, webclient_set_static_body is the
only user of body_callback in NuttX apps tree.
2020-11-19 18:46:38 -08:00
YAMAMOTO Takashi
a1db71fa43 webclient improvements
Highlights:

* TLS support (a hook to allow users to provide TLS implementation)
* ability to add extra request headers
* ability to use PUT method
* ability to report http status
* error handling improvements

Proposed on the ML while ago:
https://www.mail-archive.com/dev@nuttx.apache.org/msg03803.html

The original API is kept for now.
I plan to remove them after adapting the existing users.
(examples in this repo)
2020-10-01 15:32:25 +08:00
YAMAMOTO Takashi
b78370dbf2 webclient: move WGET_USE_URLENCODE definiton to the header
Because it's used by the header.

This fixes warnings while building wgetjson.
2020-09-30 08:22:16 +02:00
Juha Niskanen
2aabd1c9a7 webclient: run through nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-04-23 09:29:36 -06:00
Juha Niskanen
f8f16975a9 webclient: use getaddrinfo to get IPv4 addresses on dual stack systems
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-04-23 09:29:36 -06:00
Gregory Nutt
e1d36a7eca Clean up and review of header files for conformance to standards 2015-06-12 18:07:47 -06:00
Gregory Nutt
b9cf7acb1a More trailing whilespace removal 2014-04-13 16:24:28 -06:00
patacongo
ddc2a64224 Fix apps/netutils/webclient build problem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5317 42af7a65-404d-4744-a932-0658087f49c3
2012-11-06 16:59:45 +00:00
patacongo
93870670fa Add support for wget POST interface; from Darcy Gong
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5301 42af7a65-404d-4744-a932-0658087f49c3
2012-11-03 00:00:56 +00:00
patacongo
a1f980bc9d Header file clean-up
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4948 42af7a65-404d-4744-a932-0658087f49c3
2012-07-17 03:58:11 +00:00
patacongo
398cadbb31 Move nuttx/include/apps to apps/include
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3581 42af7a65-404d-4744-a932-0658087f49c3
2011-05-09 22:21:10 +00:00