Example: Basic Auth with a Pagination Cursor
curl -sS 'https://api.example.com/v2/orders?limit=50&cursor=eyJwYWdlIjoyfQ' \
-u 'user:password' -i -w '\n%{http_code}\n'
-ubase64-encodesuser:passwordintoAuthorization: Basic .... Converted code must set the header manually in some languages; the converter does this explicitly rather than relying on an auth kwarg that differs per library.- The
-wfooter makes CI assertions easy:test $(curl ...) -eq 200is brittle; a printed code isn't. The flags guide covers-wand--fail-with-body, the two flags that make scripts honest. -ion a paginated endpoint surfacesLink: rel="next"— the actual pagination cursor, which the body usually doesn't duplicate.
FAQ
Is Basic auth safe over HTTPS? Yes, that's what it was designed for — base64 is encoding, not encryption, so the TLS layer is the protection. Never over plain HTTP.
The cursor in my URL changed to something random. Bug? No — many APIs return opaque cursors (base64 of an offset or keyset). Treat them as opaque; don't construct them client-side. Parse Link: rel="next" instead.
Why does the converter print the Authorization header instead of using auth=(user, pass)? Because kwargs differ across requests/httpx/fetch and silently change behavior. An explicit header converts identically everywhere.