question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

useAxios Support custom ResponseType

See original GitHub issue

Clear and concise description of the problem

Now that axios supports custom responseType, I want useAxios to update

get<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
delete<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;

Suggested solution

UseAxios<T, R,D>

Alternative

No response

Additional context

No response

Validations

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
stale[bot]commented, Dec 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use Axios with TypeScript when using response ...
Summary In a project I am migrating to TypeScript (TS), I have a response interceptor r => r.data. How do I inform TS...
Read more >
React and TypeScript—which types for an Axios response?
thanks, so I should use axios.get<User> instead of useState<User>() ? If I try that, Typescript complains about useState() being undefined.
Read more >
Request Config | Axios Docs
For Bearer tokens and such, use `Authorization` custom headers instead. auth: { username: 'janedoe', password: 's00pers3cret' }, // `responseType` indicates ...
Read more >
Handle Blobs requests with Axios the right way - Medium
We have to create first our request: The most tricky part here is to change the responseType . We don't want to get ......
Read more >
How to make HTTP requests with Axios - LogRocket Blog
Using axios.all to send multiple requests; Sending custom headers with ... Canceling requests; Popular Axios libraries; Browser support.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found