File SystemHTTP & Networking
Stream a file as an HTTP Response
Bun.file() reads a file from disk and returns a BunFile instance, which you can pass directly to the new Response constructor.
Proxy HTTP requests using fetch()
In Bun, fetch supports sending requests through an HTTP or HTTPS proxy. Use it on corporate networks or when a request must come from a specific IP address.
Upload files via HTTP using FormData
To upload files over HTTP with Bun, use the FormData API. Start with an HTTP server that serves an HTML form.