Questions tagged [node-fetch]
462 questions
0
votes
1 answer
Batch Fetch in Firebase functions with node-fetch
I'm trying to batch fetch from the iexcloud api, a string of 100 symbols at a time, using firebase functions. My first fetch responds and writes to the DB correctly. On my second call I constantly get "Client network socket disconnected before…

MrVerticalStack
- 37
- 7
0
votes
0 answers
node http.get module: Is socket open event more accurate to consider as start time when calculating response time of HTTP requests
I am using node http module for testing 100 endpoints in parallel. Each of these endpoints are from different endpoints within my organization (different domains) and I want to calculate tcp connection time and total response time for them.
Please…

Mary123
- 11
- 4
0
votes
0 answers
node fetch returns only one data
I took this url from instagram, it returns hashtags data. The parameters have to be passed as it is in the url, otherwise it won't show. When access, it shows several, but when consuming the url, it shows only one result
url:…

GobsRuiz
- 512
- 1
- 4
- 14
0
votes
0 answers
Can you send multiple fetch post requests simultaneously to avoid rate limits?
Scenario: I have a script that uses node-fetch to GET a list of 200 users from a website, then update a variable for those users with POST to give/remove access to a restricted area. It does this for 8 different areas.
GET returns 30 users at a…

Joseph Massaro
- 123
- 4
0
votes
1 answer
Getting external website title using node-fetch
So I am trying to get an external website's title using node-fetch in my javascript file in my website and it isn't working here is the code below:
function getTitle(url) {
fetch(`${url}`, {
mode: 'no-cors'
}).then((response) =>…

moie
- 66
- 6
0
votes
1 answer
Property 'uuid' does not exist on type 'unknown'.ts(2339)
This is for a Discord bot and the error pops up when trying to fetch api data. It should reply with the fetched uuid but the bot can't even start since the error pops up on start.
Code:
import fetch from "node-fetch";
export default {
callback:…

NoBypass
- 71
- 1
- 7
0
votes
1 answer
Scraping text on google translate page - Javascript
I'm trying to scrape a few pieces of text from this URL https://translate.google.ca/?sl=en&tl=zh-TW&text=Hello&op=translate
So far I have one piece working, but I can't figure out how to get the other two.
I'm trying to get the original text (eng),…

Grambam
- 424
- 1
- 3
- 17
0
votes
1 answer
Common crawl request with node-fetch, axios or got
I am trying to port my C# common-crawl code to Node.js and getting error in with all HTTP libraries(node-fetch, axios of got) in getting the single page HTML from common-crawl S3 archive.
const offset = 994879995;
const length = 27549;
const…

Vikash Rathee
- 1,776
- 2
- 25
- 43
0
votes
1 answer
digest-fetch and webpack - fetch is not a function
The Problem
TypeError: fetch is not a function
at DigestClient.fetch (webpack-internal:///./node_modules/digest-fetch/digest-fetch-src.js:48:24)
at User.create (webpack-internal:///./node_modules/mongodb-atlas-api-client/src/user.js:53:26)
…

bflemi3
- 6,698
- 20
- 88
- 155
0
votes
2 answers
How can I redirect the user to a custom URL scheme with Express.js and node-fetch?
Sorry if my usage of server-related words is wrong, I'm new to this. I have two Express.js servers one on port 3000 and one on port 8000. The browser renders two different HTML files on these two ports. First I start the server on port 8000. As soon…

Oliver
- 25
- 1
- 6
0
votes
2 answers
How to correctly structure a nested node-fetch request to avoid Promise?
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 the check shows no duplicates, Fetch POST into my…

Blue Moon
- 79
- 1
- 9
0
votes
2 answers
Dynamic Slash Command Options List via Database Query?
Background:
I am building a discord bot that operates as a Dungeons & Dragons DM of sorts. We want to store game data in a database and during the execution of certain commands, query data from said database for use in the game.
All of the…

Geowil
- 624
- 1
- 12
- 36
0
votes
1 answer
Shopify REST Admin API - fetch orders by line_items[0].title = something
For context, I am requesting via node-fetch the Shopify Admin REST API orders.json with the queries shown in my code. For some reason, this only returns the latest order regardless of if I add status=any or limit=250 (which is the standard limit for…

Matt Nyce
- 57
- 9
0
votes
2 answers
Making POST request to discord server in nodejs
I am trying to make a post request to the following endpoint:
`https://discord.com/api/v9/invites/${link}`
But, i keep getting the following response:
{
captcha_key: [ 'captcha-required' ],
captcha_sitekey:…

Nabeel Munir
- 51
- 8
0
votes
0 answers
How to use node fetch and express at the same time?
I want to get data from API and show it. I use node-fetch and express. Node-fetch is not supported 'require'. Therefore, I use import fetch from 'node-fetch'. For this, I added "type": "module" in package.json. I get an error when I try to add…

fingolfin
- 19
- 6