Questions tagged [node-fetch]
462 questions
0
votes
1 answer
node-fetch and discord.js | how to fetch info or a title from a website every time you use a command?
How to fetch info or a title from a website every time you use a command?
For example, if I use a command called ?title I get a name of the title from a website, how should I do that?
user14368912
0
votes
0 answers
How to send 'if-modified-since' with node fetch headers
I want to implement a node script which should download some images from remote sites, say once every hour, with a local cache, on filesystem.
I would like to know if it's possible to add something like an "if-modified-since" tag in the node fetch…

MarcoS
- 17,323
- 24
- 96
- 174
0
votes
1 answer
node-fetch use get method for get a specific file content
I use node-fetch for make requests to localhost.
I want to use get method for get specific file content.
An example: my node.js server is a file called app.js, and in the same folder there is a file called config.json, so I want to get (from a…

BlackdestinyXX
- 331
- 3
- 17
0
votes
2 answers
React Promise will not return a value
When trying to resolve my promise, I get the error "Objects are not valid as a React child (found: [object Promise])."
In the console.log after my API request in GetCardsFromBoard(), the typeOf() my response is string and it prints out the data to…

LeaRuth
- 35
- 1
- 7
0
votes
2 answers
Accept self signed certificate on local Apollo's RESTDataSource
How can I accept self signed local certificates when creating a RESTDataSource class extend and developing locally?

Mel Macaluso
- 3,250
- 2
- 12
- 26
0
votes
1 answer
cURL giving the correct resonse but nodejs fetch redirecting to access denied
I want to download a json file from a website. Using the chrome dev tool, when I am copying the cURL command of the file downloading url, it is giving me the required json response. But when copying the fetch (nodejs) command, and running through…

Stackboi
- 37
- 1
- 8
0
votes
0 answers
Speed issues looping through node-fetch API calls - is there a better way?
I am fetching over 7 million records from an API using fetch-node in a node js script.
The records each have a sequential id starting from 1, so I using a for loop to access each record. The main issue I am having is speed!
Initially I did one a…

joecampbelluk
- 71
- 1
- 2
- 5
0
votes
2 answers
Why Can't I Fetch a Webpage (With NodeJS and Node-Fetch)?
I am trying to fetch a site: link here. If you click on the link, it shows JSON: {"error":"Socket Error"}. I am trying to fetch that website, and return the error.
However, I get a 403 Forbidden error instead. Is there a reason for this? I turned…

imaginate
- 567
- 2
- 13
0
votes
1 answer
Post request: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
I'm making a simple backend API but I keep getting this error when I try to post:
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
The first part of the code seems to run but I'm not sure why the rest is erroring.…

Current
- 65
- 1
- 5
0
votes
1 answer
keep fetching data up to date
I have just a question I want to ask if anybody have an idea about it.
I'm building a full stack application backed by nodejs and using typescript for it, in my nodejs app I'm making a fetch for an API that later on I will serve it to the user but I…

Errand
- 121
- 9
0
votes
0 answers
GET/POST requests from Nodejs to Google App Engine not working
Trying to migrate some resources from Cloud functions to App Engine.
Problem: When I send a request from another Nodejs server to app deployed to App Engine,
await axios.get("https://project-id.uc.r.appspot.com/hey")
it gives error:
(node:13088)…

itsam
- 301
- 2
- 10
0
votes
0 answers
Setting NO_PROXY in http call from NodeJS+Express
I am building a nodejs+express application which makes a HTTP GET call using the node-fetch library to retrieve a response from a service. The problem is the host of that service which I am calling does not work well with proxy, it sometime returns…

zakSyed
- 1,364
- 1
- 13
- 30
0
votes
2 answers
Why am I getting a '400: Bad Request' when i try to change my Discord avatar?
Before i get 100 people telling me that automating user accounts is against the Terms of Service, I know that and i am willing to take the risk, i just came here for help because i've been trying for hours.
I checked how to change my profile picture…

c8h_
- 143
- 1
- 9
0
votes
1 answer
Set node-fetch parameter dynamically
For a unit test I am creating a new user via POST in my database, retrieving a id and token. After that I want to DELETE this user with the id, token I just received from the first fetch.
import fetch from 'node-fetch';
type Response = {
…

ver.i
- 526
- 1
- 5
- 13
0
votes
0 answers
Express returning 200 even if error from server
I am trying to connect to a third party endpoint from my express app. With specific body Doing the same request in curl directly to that endpoint gives me a 400 status with a specific error message.
Now using express + node-fetch, I am getting the…

AngularDebutant
- 1,436
- 5
- 19
- 41