File SystemHTTP & Networking
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.
Configure TLS on an HTTP server
Set the tls key to configure TLS. Both key and cert are required: key is the contents of your private key and cert is the contents of your issued certificate.
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.