Skip to content

convert axios request to curl command using interceptor

License

Notifications You must be signed in to change notification settings

rvibit/axios-to-curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

axios-to-curl

Axios interceptor to convert axios request to curl command.

Usage

Copy the file into your project then create axios instance and apply interceptors

//create axios instance

const http = axios.create({
  baseURL: '',
  headers: {},
});

//apply interceptors
http.interceptors.request.use(axiosToCurl);

Note

Axios interceptors are applied in reverse order so if you have multiple interceptors then this must be the first interceptor so it can get all the modifications which are done by other interceptors.

About

convert axios request to curl command using interceptor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published