[PATCH 0/3] Make wget useful for API calls i.e. goodbye curl.

Sergey Ponomarev stokito at gmail.com
Mon May 9 14:59:19 PDT 2022

The uclient-fetch which is a wget clone currently is very limited and used only for download.
It can send POST request but it imitates a form submit.
So many OpenWrt users have to install a full GNU wget or even curl.
This is often needed even for simplest things like DynDNS or ACME.sh.
To cover 95% of REST API calls we just need send any body with any header and http method.
I.e. --method, --body-data --header.

Related discussions:
* 2020-01-27 uclient-fetch add ability to pass custom http headers
* 2020-07-03 uclient-fetch: use HEAD method in spider mode
* 2021-06-03 uclient-fetch: allow to overwrite Content-Type header for POST
* 2016-06-17 [LEDE-DEV,uclient] enable --post-file, use "Content-Length" instead of chunked encoding

I added peoples from that discussions so they can review.

Sergey Ponomarev (2):
  uclient-fetch: Extract opt_post variable
  uclient-fetch: Support of --method, --body-data and --body-file

Sungbo Eo (1):
  uclient-fetch: Use HEAD for --spider

 uclient-fetch.c | 40 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 37 insertions(+), 3 deletions(-)


More information about the openwrt-devel mailing list