thallo-api-signature
npm i @thallo/api-signature
Example
import ApiSignature from '@thallo/api-signature'
const apiSignature = new ApiSignature({
appKey: 'xxxxxx',
appSecret: 'xxxxxxx',
stage: 'TEST'
})
// axios.interceptors.request.use(config => config)
const config = {
method: 'get',
url: '/logs',
params: {
page: 1,
size: 15
},
headers: {
common: {
Accept: 'application/json'
},
get: {
'Content-Type': 'application/json'
}
}
}
const result = apiSignature.handleHeaders(config)
return result