namespace
fetch
Send an HTTP(S) request.
@param input
URL string, URL, or Request object
@param init
Options for the request
@returns
A promise that resolves to the Response
namespace fetch
Bun's extensions of the fetch API
- options?: { dns: boolean; http: boolean; https: boolean; tcp: boolean }): void;
Resolve a URL's DNS and establish a TCP connection before a request is made, to speed up the eventual
fetch.Not part of the Fetch API specification.
@param urlThe URL to preconnect to
@param optionsWhich stages of the connection to set up