[PATCH 4/4] uclient-fetch: Support of --method, --body-data and --body-file

2022-05-09 Thread Sergey Ponomarev
The --method allows to execute PUT,DELETE,OPTIONS. Usage sample: $ uclient-fetch -O - -q --method=PUT \ --body-data="trololo" \ --header="Content-Type: text/plain" \ http://localhost:8080/cgi-bin/echo.sh HTTP/1.1 200 OK Content-Length: 7 Content-Type: text/html REQUEST_METHOD: PUT CONTENT_TYPE:

[PATCH 3/4] uclient-fetch: Use HEAD for --spider

2022-05-09 Thread Sergey Ponomarev
From: Sungbo Eo In GNU wget the --spider[1] first issues a HEAD request[2], then if HEAD fails, issues a GET request[3]. In uclient, only a GET request is sent. All webservers including uhttpd and BB httpd supports the HEAD. The patch changes GET to HEAD e.g. get the file size only without

[PATCH 1/4] uclient-fetch: --header option to pass additional raw HTTP headers

2022-05-09 Thread Sergey Ponomarev
You can add a custom HTTP header(s) to request: wget --header='Authorization: Bearer TOKEN' \ --header='If-Modified-Since: Wed, 9 May 2021 12:16:00 GMT' \ https://example.com/ Some headers like Authorization or User-Agent may be already set by --password or --user-agent. We

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

2022-05-09 Thread Sergey Ponomarev
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

[PATCH 2/4] uclient-fetch: Extract opt_post variable

2022-05-09 Thread Sergey Ponomarev
The var means that ether --post-data or --post-file was set. Remove duplicated code to set header "Content-Type: application/x-www-form-urlencoded" Signed-off-by: Sergey Ponomarev --- uclient-fetch.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/uclient-fetch.c

[PATCH] uclient-fetch: Support of --server-response [Draft/WIP/Help needed]

2022-05-09 Thread Sergey Ponomarev
The -S is useful for debugging. With --spider or --method=HEAD it allows check size before download by Content-Length header. TODO currently the uclient-http must somehow to call a callback to print. Signed-off-by: Sergey Ponomarev --- uclient-fetch.c | 12 +++- uclient-http.c | 3

Re: [sdwalker/sdwalker.github.io] 2bdb42: This week's update

2022-05-09 Thread edgar . soldin
is the below weekly message of any informational value to _all_? can someone maybe block this if it's not? ..thanks ede On 08.05.2022 23:05, Stephen Walker via openwrt-devel wrote: The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the