You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I understand that in order to use axios we have to modify the backendFetcher.ts file. But I do not want to miss anything and introduce a bug. Thus it would be great if there was an official guide to use axios with this awesome tool.
My attempt:
exportasyncfunctionbackendFetch<TData,TError,TBodyextends{}|FormData|undefined|null,THeadersextends{},TQueryParamsextends{},TPathParamsextends{},>({
url,
method,
body,
headers,
pathParams,
queryParams,
signal,}: BackendFetcherOptions<TBody,THeaders,TQueryParams,TPathParams>): Promise<TData>{// $axios is my axios instance with an interceptorconstresponse=await$axios({url: `${baseUrl}${resolveUrl(url,queryParams,pathParams)}`,method: method.toUpperCase(),signal: signal,data: body
? bodyinstanceofFormData
? body
: JSON.stringify(body)
: undefined,headers: {"Content-Type": "application/json", ...headers},});returnresponse.data;}
The text was updated successfully, but these errors were encountered:
Hello. I understand that in order to use axios we have to modify the
backendFetcher.ts
file. But I do not want to miss anything and introduce a bug. Thus it would be great if there was an official guide to use axios with this awesome tool.My attempt:
The text was updated successfully, but these errors were encountered: