Questions tagged [node-fetch]
462 questions
0
votes
0 answers
Is there a way to delve into objects using Node-Fetch API
I've been tasked with a project that requires the use of API. I would love to learn if possible, how to delve into an object using node-fetch API.
I am looking to fetch a list of objects on a page, I am currently able to receive information as to…

Dan
- 1
0
votes
0 answers
Importing node-fetch module into a CDK project
I have been trying to get the node-fetch module in a CDK project.
So that i can use it in a Lambda function.
The dependency is in the package.json file.
I installed it in the node package manager.
I keep getting: Cannot find module 'node-fetch.
I…

joey visbeen
- 43
- 7
0
votes
0 answers
Is there is any solution to show output of node JS in vs code terminal
I am a new learner of nodejs. I am using VScode for node Js file. The output of the file is shown in the node JS terminal, But for my convenience, I want to do it in the VScode terminal. when I wrote 'node' in the VScode terminal rather than…

zunaira shafiq
- 1
- 1
0
votes
1 answer
node-fetch connect ECONNREFUSED for fetching my api on vps server
I have been working on a NodeJS express app that uses EJS and node-fetch to fetch my Api from my vps server, but it won't get fetched, every page of the app will load but the page that uses the Api where I am fetching the Api won't work, I have been…

ZeyoYT
- 11
- 3
0
votes
0 answers
Copied browser request as Node fetch via dev tools is not working
Chrome devtools has a feature that allows to copy a request in the browser as node-fetch
But for some reason if I try to run this request in node it returns:
status: 403,
statusText: 'Forbidden'
I am by no means an expert on http requests, but…

supersize
- 13,764
- 18
- 74
- 133
0
votes
0 answers
Technical Assessment, I'm new and could use a hand. It's Koa server, React frontend form, backend api call, cannot be on front end. TY
I have these two files below, I'll try and be specific as possible to get a good answer. I have used express but never Koa, although the same founders but anyways I'm having trouble with this simple technical assessment.
They want a React app form…

Brendan F
- 19
- 1
0
votes
0 answers
Is there a way to sub node-fetch-commonjs? I tried mine, it didn't work
I tried my code
let stubFetch;
const fetch = require("node-fetch-commonjs");
stubFetch = sinon.stub(fetch, "default");
stubFetch.returns(Promise.resolve(new Response( { message : "success" }, { status: 200 })));
stubFetch.restore();
it doesn't…

TEST TEST MAN
- 33
- 6
0
votes
2 answers
Technical Assessment stuck
I got a technical assessment that I've been messing with but can't get working. I need to get this HTML form working. The API call has to be done on the backend using isomorphic-fetch, their rules. What needs to happen to meet MVP I guess is that…

Brendan F
- 19
- 1
0
votes
0 answers
How do delegated routing nodes in IPFS save http responses to a remote requesting node's local directory?
I've been analyzing the js ipfs source codes to understand how exactly delegated routing works. It turns out that js ipfs uses delegated routing by default, which means whenever I call IPFS.cat(), I send an http request to a delegated routing node…

rasputin
- 31
- 5
0
votes
0 answers
Getting Timeout error(504) from an https POST endpoint in swagger-ui
I am using POST api built by different team in our application and since its taking more than 1 minute to return a response our graphql mutation is returning Internal_Server_error…

SlackOff
- 3
- 2
0
votes
2 answers
vscode extension API - "fetch is not defined"
I recently picked up a VSCode extension project I've done about a year ago.
In code it uses fetch to call APIs
This fetch used to work if I hit Start Debugging on this extension project, but now it doesn't.
Everytime it gets to this line, VSCode…

wxh
- 619
- 7
- 20
0
votes
0 answers
Random characters in and at the end of a Response body (node.js)
I'm having issues with my node-fetch (specifically, node-fetch-cookies library). I'm supposed to get a string returning from a POST request…

tzuleger
- 29
- 3
0
votes
0 answers
How do I implement a retry with node-fetch and a timeout?
Currently, I am attempting to send a payload to an endpoint with node-fetch. I am using the NestJS event emitter and when the event happens sometimes the payload just wont send. So if webhookResponse is undefined after execution is run I want to try…

Tree
- 1
0
votes
0 answers
Vercel serverless function not working in development error: write EPROTO
In this above image I first coded the next app
then I didn't saw in vercel function log. so use vercel doc to create the serverless functions. I move my functions
from pages/api to /api
&& this Just happened in localhost
"dependencies": {
…

Sadhin
- 123
- 2
- 10
0
votes
1 answer
Does node-fetch support request forwarding?
I'm trying to translate this code to work with node-fetch but I'm kinda stuck in figuring out how the node-fetch can forward the whole req bit since it's the one that contains the file I want to upload.
async function handler(req, res) {
let…

E_K
- 2,159
- 23
- 39