Skip to content

Documentation/netutils: add comprehensive guide for webclient - #20472

Merged
GUIDINGLI merged 1 commit into
apache:masterfrom
Swatantra-66:doc/webclient-guide
Oct 9, 2026
Merged

GUIDINGLI merged 1 commit into
apache:masterfrom
Swatantra-66:doc/webclient-guide

Conversation

@Swatantra-66

Copy link
Copy Markdown
Contributor

Summary

This PR replaces the 7-line placeholder stub in Documentation/applications/netutils/webclient/index.rst with a comprehensive, production-grade reference and guide for the webclient HTTP client utility and library.

Addresses #11081

Key Additions:

  • Architecture Overview: Documents webclient's dual role as both the interactive NSH wget shell command engine and a standalone programmatic C API.
  • Core Capabilities: Covers HTTP/1.0 and HTTP/1.1 compliance, chunked transfer decoding, streaming sink callback model, pluggable TLS/HTTPS engine (struct webclient_tls_ops), proxy tunneling, and notes the synchronous/blocking nature of DNS resolution under WEBCLIENT_FLAG_NON_BLOCKING.
  • Kconfig Options & Dependencies: Details configuration prerequisites (CONFIG_NET_TCP, CONFIG_NETDB_DNSCLIENT, etc.) and all tuneable options (CONFIG_WEBCLIENT_TIMEOUT, CONFIG_WEBCLIENT_MAXHTTPLINE, etc.).
  • NSH wget CLI Guide: Documents exact synopsis, options (-o <local-path>), and practical shell examples.
  • C API Reference: Documents convenience functions (wget(), wget_post()) and the full context-based API (struct webclient_context, webclient_perform()).
  • Production C Application Example: Provides a runnable embedded file-download helper implementing robust short-write loops, EINTR retry handling, and close() filesystem sync error propagation.

Impact

  • Documentation: Fills one of the unwritten documentation pages identified in Documentation: blank pages in documentation #11081.
  • User Experience: Fixes command-line option discrepancies (-o instead of -f) and provides clear, secure patterns for embedded file transfers.
  • Code/Build: Documentation-only change. No functional code or ABI alterations.

Testing

  • Validated Sphinx reStructuredText formatting and header underline lengths.
  • Verified NSH CLI flags against apps/nshlib/nsh_command.c and nsh_netcmds.c.
  • Verified C API definitions and callback signatures against apps/include/netutils/webclient.h.

Provide a complete documentation page for the webclient network utility
in Documentation/applications/netutils/webclient/index.rst, replacing
the previous 7-line placeholder stub.

Includes:
- Architecture overview (NSH wget engine + programmatic C API)
- Key features (HTTP/1.0, HTTP/1.1, chunked encoding, pluggable TLS,
  non-blocking I/O, proxy tunneling)
- Detailed Kconfig configuration table and dependencies
- NSH wget syntax, options, and real-world usage examples
- C API reference for simple helpers (wget, wget_post) and the
  context-based API (struct webclient_context)
- Complete, runnable C application example for file downloads

Addresses apache#11081

Signed-off-by: Swatantra Yadav <[email protected]>
@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium labels Oct 6, 2026
@GUIDINGLI
GUIDINGLI merged commit f14e5f4 into apache:master Oct 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants