All Questions
8 questions
0
votes
2
answers
849
views
How to correctly structure a nested node-fetch request to avoid Promise<pending>?
I'm attempting to
Fetch GET my website (with node-fetch)
Scrape it with Cheerio to get specific posts
Fetch GET from my CMS (with node-fetch) to check if there's already a post with the same time
If ...
0
votes
1
answer
843
views
How to improve async node fetch with a synchronous internet connection?
I have a fast synchronous fibre connection at home. The speed is great for streams and large packages. However multiple async node fetch are very slow due to the connection overhead. I never have more ...
0
votes
0
answers
408
views
TypeScript: how to handle async functions inside setTimeout()?
I have the following timed function to periodically refetch credentials from an external API in your usual movie fetching IMDB clone app:
// This variable I pass later to Apollo Server, below all ...
1
vote
1
answer
1k
views
TypeScript: type for returning an async function call inside a setTimeout()?
I have a function for fetching credentials for an external API (oversimplified):
const fetchCredentials= async () => {
return await fetch(/* url and params */);
};
And another one which ...
2
votes
2
answers
880
views
When does the async / await chaining stop?
I was testing node-fetch and when I was using async / await, a question came up : I have to make my function async if I use await in it BUT since my function is async I need to await it and make the ...
7
votes
1
answer
31k
views
trouble using node.js w/ node-fetch module in async AWS Lambda Function
Here's what I'm trying to do: I have a lambda function triggered by a webhook that will process that data and use it to make a POST request to an api.
I'm using Node.js 12 and the node-fetch module.
...
-1
votes
1
answer
1k
views
Restart Async Function After Aborting API Fetch
I am creating a Node.js module that takes a list of movie titles and fetches their respective metadata from omdbapi.com.
These lists are often very large and sometimes (with my current slow internet ...
0
votes
2
answers
1k
views
incorrect behaviour of node-fetch while trying to get token from an api
I want to connect to an external api using some node-fetch code. My code first sends the login details & should receive a token from the api. Then this token is used for all the later ...