0
Ich versuche zu Get
graphQL Endpunkt der Github axios
verwenden und es hält mich begrenzen und zu sagen, dass ich nicht authentifiziert bin:Warum ist Github GraphQL API 401 mit Axios?
const handleClick = token => event =>
axios.get("https://api.github.com/graphql", {
headers: { "Authorization": "bearer" + token}
}).then(response => console.log(response))
Und ich bekomme diese Fehlermeldung zurück:
GET https://api.github.com/graphql 401 (Unauthorized)
bundle.js:1475 Uncaught (in promise) Error: Request failed with status code 401
at createError (bundle.js:1475)
at settle (bundle.js:1619)
at XMLHttpRequest.handleLoad (bundle.js:1028)
createError @ bundle.js:1475
settle @ bundle.js:1619
handleLoad @ bundle.js:1028