Skip to content

Commit

Permalink
Fix up some of the type info
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalrymple committed Aug 7, 2023
1 parent e5a8c63 commit e937d23
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/requester-utils/src/RequesterUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ export type DefaultRequestOptions = {
};

export type RequestOptions = {
headers: Record<string, string>;
headers?: Record<string, string>;
timeout?: number;
method: string;
method?: string;
searchParams?: string;
prefixUrl: string;
prefixUrl?: string;
body?: string | FormData;
asStream?: boolean;
signal?: AbortSignal;
Expand Down Expand Up @@ -104,13 +104,14 @@ export async function defaultOptionsHandler(
const { headers: preconfiguredHeaders, authHeaders, url } = resourceOptions;
const headers = { ...preconfiguredHeaders };
const defaultOptions: RequestOptions = {
headers,
method,
asStream,
signal,
prefixUrl: url,
};

defaultOptions.headers = headers;

if (sudo) defaultOptions.headers.sudo = `${sudo}`;

// FIXME: Not the best comparison, but...it will have to do for now.
Expand Down

0 comments on commit e937d23

Please sign in to comment.