Skip to content

Instantly share code, notes, and snippets.

@EbbeVang
Created November 4, 2018 23:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EbbeVang/61d9e7229f34a761857d110a19634097 to your computer and use it in GitHub Desktop.
Save EbbeVang/61d9e7229f34a761857d110a19634097 to your computer and use it in GitHub Desktop.
axios - get with headers
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