Skip to content

Instantly share code, notes, and snippets.

@OrionStark
Created February 11, 2020 06:59
Show Gist options
  • Save OrionStark/b7b7800d68e181025649719d507eda58 to your computer and use it in GitHub Desktop.
Save OrionStark/b7b7800d68e181025649719d507eda58 to your computer and use it in GitHub Desktop.
Axios as adapter
axios({
method: method,
baseURL: service.base_url + ':' + service.port,
url: request.path,
responseType: 'json',
data: request.body,
params: request.params,
headers: {
gateway_signature: token,
authorization: request.authorization
}
})
.then(response => { resolve(response) })
.catch(err => { reject(err) })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment