mirror of
https://github.com/NCBM/plyngent.git
synced 2026-11-07 23:47:54 +08:00
core/tools: document fetch's 0-based body offset
This commit is contained in:
@@ -80,6 +80,10 @@ async def fetch(
|
|||||||
"""HTTP request (GET/POST/PUT/DELETE); return status, metadata, and truncated body.
|
"""HTTP request (GET/POST/PUT/DELETE); return status, metadata, and truncated body.
|
||||||
|
|
||||||
Use for public docs/APIs or (after human policy allow) local/LAN servers.
|
Use for public docs/APIs or (after human policy allow) local/LAN servers.
|
||||||
|
``offset`` skips that many leading characters of the body (0-based), for
|
||||||
|
paging through a body larger than ``max_chars``; a body truncated by
|
||||||
|
``max_chars`` keeps its remainder in memory instead, resumable via its
|
||||||
|
``truncate_token`` without another request.
|
||||||
``user_agent`` sets User-Agent when provided and takes precedence over a
|
``user_agent`` sets User-Agent when provided and takes precedence over a
|
||||||
User-Agent entry in ``headers``. A headers-only User-Agent is kept as-is.
|
User-Agent entry in ``headers``. A headers-only User-Agent is kept as-is.
|
||||||
When both omit UA, a small default is used.
|
When both omit UA, a small default is used.
|
||||||
|
|||||||
Reference in New Issue
Block a user