Created
November 4, 2018 23:33
-
-
Save EbbeVang/61d9e7229f34a761857d110a19634097 to your computer and use it in GitHub Desktop.
axios - get with headers
This file contains 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
import axios, { AxiosRequestConfig, AxiosPromise } from 'axios'; | |
axios.get("http://api.evang.dk/randomwords/", { | |
'headers': | |
{ | |
'numberOfWords': 5, | |
'maxWordLength': 10, | |
'minWordLength': 8, | |
} | |
}) | |
.then(function (response) | |
{ | |
console.log(response.data); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment