Skip to content

Allow customization of what is sent to fetch function #23

@stazz

Description

@stazz

The following properties should be added to HTTPEndpointCallerOptions:

  • resourceInit?: (args: FetchCustomizationParameters) => URL | Request
  • requestInit?: RequestInitCustomization | ((args: FetchCustomizationParametrs<URL | Request>) => RequestInitCustomization)
export interface FetchCustomizationParameters<TResource = URL> {
  resource: TResource;
  method: data.HttpMethod;
  body: string | undefined;
  headers: Record<string, data.HeaderValue> | undefined;
}

export type RequestInitCustomization = Omit<RequestInit, "method" | "body" | "headers">;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions