Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => {
const makeSseFn =
(method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
const { opts, url } = await beforeRequest(options);
const { body, ...sseOpts } = opts;
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
...sseOpts,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => {
const makeSseFn =
(method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
const { opts, url } = await beforeRequest(options);
const { body, ...sseOpts } = opts;
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
...sseOpts,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
url,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
url,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as Record<string, string>,
method,
// @ts-expect-error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as Record<string, string>,
method,
// @ts-expect-error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as Record<string, string>,
method,
// @ts-expect-error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as Record<string, string>,
method,
// @ts-expect-error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as Record<string, string>,
method,
// @ts-expect-error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const createClient = (config: Config = {}): Client => {
const { opts, url } = await beforeRequest(options);
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
body: opts.body as any,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => {
const makeSseFn =
(method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
const { opts, url } = await beforeRequest(options);
const { body, ...sseOpts } = opts;
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
...sseOpts,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => {
const makeSseFn =
(method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
const { opts, url } = await beforeRequest(options);
const { body, ...sseOpts } = opts;
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
...sseOpts,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => {
const makeSseFn =
(method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
const { opts, url } = await beforeRequest(options);
const { body, ...sseOpts } = opts;
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
...sseOpts,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => {
const makeSseFn =
(method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
const { opts, url } = await beforeRequest(options);
const { body, ...sseOpts } = opts;
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
...sseOpts,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => {
const makeSseFn =
(method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
const { opts, url } = await beforeRequest(options);
const { body, ...sseOpts } = opts;
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
...sseOpts,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ export const createClient = (config: Config = {}): Client => {
const makeSseFn =
(method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {
const { opts, url } = await beforeRequest(options);
const { body, ...sseOpts } = opts;
return createSseClient({
...opts,
body: opts.body as BodyInit | null | undefined,
...sseOpts,
headers: opts.headers as unknown as Record<string, string>,
method,
onRequest: async (url, init) => {
Expand Down
Loading