Add Reference section for the HTTP API - #79
Conversation
arrufat
left a comment
There was a problem hiding this comment.
Verified everything against bgw at 3cbf3468, which is still master's HEAD, so no drift on this one. Both fixes check out in the handler: wait_ms is *uint with a > 0 guard so 0 really does fall back to the 5000ms default, and the response struct is Status int with Headers map[string]any and omitempty, matching the new int/object/optional wording. The raw content types (text/html / text/plain) and all defaults match too. Two small notes inline.
| import type { MetaRecord } from 'nextra' | ||
|
|
||
| const meta: MetaRecord = { | ||
| 'http-api': 'HTTP API', |
There was a problem hiding this comment.
There was a problem hiding this comment.
Yes, I chose to create independent PRs, all based on the main branch, so as not to constrain which one we want to merge first. But sure, I'll handle the conflicts after each merge (not a complex conflict). As for the order, I'm planning: CLI, HTTP API, MCP tools, Pandascript.
Summary
reference/http-apipage documenting the/api/fetchendpoint's request parameters and response shape, sourced from Lightpanda Cloud'sbgwrepo (api/fetch.go,api/fetch/fetch.go,api/browser.go)usage/api.mdxdown to a practical guide (connect + one example), linking to the new reference for the full parameter/response listbgw@3cbf3468(origin/master):status's type isint, notuintwait_ms: 0doesn't mean "don't wait" — it silently falls back to the same 5000ms default as omitting the fieldbgw's own source, which has no proxy-name allow-list) thatproxy_namereally does default tofast_dcandcountryonly takes effect withproxy_name: "datacenter"; both existing claims check outThis PR is part of a series splitting the new Reference section (CLI, MCP tools, HTTP API, PandaScript) into smaller pieces so each can be reviewed and merged on its own: #76 (CLI reference), #77 (MCP tools reference), #78 (PandaScript reference).
No cross-references here point at another PR's pages, so nothing needs fixing once the others merge.