Created
February 11, 2020 06:59
-
-
Save OrionStark/b7b7800d68e181025649719d507eda58 to your computer and use it in GitHub Desktop.
Axios as adapter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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