Skip to content

fetch: (input, init?) => Promise<Response>

Wrapped version of fetch that makes authorized requests to Vault REST API and prepends the /api prefix to the path

string

The URL to make a request to

RequestInit

The options for the request

Promise<Response>

This only supports strings for the input, so you can't use a URL or a Request object.

This naively prepends /api to the provided URL, so if you were to call with "http://example.com", it would make a request to "/api/http://example.com"