Creates a new FetchTransport.
Optionaloptions: { followSameOriginRedirects?: boolean; urlGuard?: UrlGuard; userAgent?: string }Optional configuration: custom User-Agent prefix and SSRF guard.
OptionalfollowSameOriginRedirects?: booleanFollow same-origin GET/HEAD redirects after checking the target with the URL guard. POST redirects are still blocked to avoid replaying credential-bearing payloads to an unexpected endpoint. Defaults to true.
OptionalurlGuard?: UrlGuardOptionaluserAgent?: stringReadonlyurlSSRF allow-list applied to every outgoing URL. Mutable so B2Client.authorize() can lock it down post-auth.
Sends the request using the global fetch function.
The HTTP request to execute.
The HTTP response.
Default transport implementation using the global
fetchAPI. Automatically sets the User-Agent header on each request and applies the SSRF UrlGuard (if configured) before opening the connection. Redirect following is disabled so redirected URLs cannot bypass the guard or receive credential-bearing headers without an explicit checked request.