ApiFetcher
A class which makes it easier to access a Kobweb API endpoint, instead of using Window.fetch directly.
This class works by wrapping Window.http but specifically for Kobweb API calls (URLs which are prefixed with "/api/").
Properties
Functions
Call DELETE on a target API path, returning the response body as a raw array of bytes.
Call OPTIONS on a target API path, returning the response body as a raw array of bytes.
Call PATCH on a target API path.
Call PATCH on a target API path, returning the response body as a raw array of bytes.
Call POST on a target API path.
Call POST on a target API path, returning the response body as a raw array of bytes.
Call PUT on a target API path.
Call PUT on a target API path, returning the response body as a raw array of bytes.
Like delete, but returns null if the request fails.
Like delete, but returns null instead of throwing if the request fails.
Like deleteBytes, but returns null if the request fails or its body can't be read.
Like get, but returns null if the request fails.
Like get, but returns null instead of throwing if the request fails.
Like getBytes, but returns null if the request fails or its body can't be read.
Like head, but returns null if the request fails.
Like head, but returns null instead of throwing if the request fails.
Like options, but returns null if the request fails.
Like options, but returns null instead of throwing if the request fails.
Like optionsBytes, but returns null if the request fails or its body can't be read.
Like patch, but returns null if the request fails.
Like patch, but returns null instead of throwing if the request fails.
Like patchBytes, but returns null if the request fails or its body can't be read.
Like post, but returns null if the request fails.
Like post, but returns null instead of throwing if the request fails.
Like postBytes, but returns null if the request fails or its body can't be read.
Like put, but returns null if the request fails.
Like put, but returns null instead of throwing if the request fails.
Like putBytes, but returns null if the request fails or its body can't be read.