Skip to main content

@zero-dependency/fetcher

Index

Type Aliases

FetcherMethods

FetcherMethods: typeof METHODS[number]

FetcherOptions

FetcherOptions: Pick<RequestInit, headers | credentials | mode | cache | redirect | referrerPolicy>

FetcherParams

FetcherParams: Record<string, string | number>

FetcherRequest

FetcherRequest: <T>(path: string, options?: FetcherRequestInit) => Promise<T>

Type declaration

FetcherRequestInit

FetcherRequestInit: Omit<RequestInit, method> & { params?: FetcherParams }

FetcherRequestOptions

FetcherRequestOptions: FetcherRequestInit & { method: FetcherMethods }

Variables

constMETHODS

METHODS: readonly [get, post, put, patch, delete, head, options] = ...