8000 GitHub - socheatsok78/axios-authorization at v0.1.1
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

socheatsok78/axios-authorization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

axios-authorization

Axios authorization plugin

Install

npm install @socheatsok78/axios-authorization
# or
yarn add @socheatsok78/axios-authorization

Usage

import axios from 'axios'
import { useAuthorization, TokenType } from '@socheatsok78/axios-authorization'

useAuthorization(axios)

// Set the authorization as Bearer token to request header of current `axios` instance.
axios.setAuthorization('token', TokenType.Bearer) 

// To unset the authorization token
axios.unsetAuthorization() 

License

Licensed under the MIT License.

About

Axios authorization plugin 🎫

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 
0