Parsing API Key
#2191
Replies: 1 comment 1 reply
-
You're trying to make GET request with json body. To authenticate request for weatherstak, you need to pass your import got from 'got';
const { data } = await got.get('http://api.weatherstack.com/current', {
searchParams: {
access_key: '***',
query: 'New York'
}
}).json();
console.log(data); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, all:
How can I parse my API key in this code?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions