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, returning the response body as a raw array of bytes.
Call POST on a target API path, returning the response body as a raw array of bytes.
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 failed for any reason.
Like get, but returns null if the request failed for any reason.
Like head, but returns null if the request failed for any reason.
Like options, but returns null if the request failed for any reason.
Like options, but returns null if the request failed for any reason.
Like patch, but returns null if the request failed for any reason.
Like post, but returns null if the request failed for any reason.
Like put, but returns null if the request failed for any reason.