node-fetch Questions

5

Solved

I'd like to display Google Place Photos in my NextJS application. To GET these images from their specified URL an API key is needed, but at the same time, I do not want to expose this API key to th...
Analemma asked 27/9, 2022 at 19:8

2

Solved

I am executing a standalone nodejs script (no web server involved) that needs to fetch result from a third party api. The program uses 'node-fetch' to do the fetch(url) and I run it using node .\te...
Marinate asked 11/2, 2020 at 5:23

3

Solved

I have the following code, which is run from a express server: import fetch from 'node-fetch'; let formBody = []; const dataLogin = { 'username': 'myUser', 'password': 'myPassword' }; for (l...
Firenze asked 24/9, 2018 at 11:13

15

Solved

I'm creating a program to analyze security camera streams and got stuck on the very first line. At the moment my .js file has nothing but the import of node-fetch and it gives me an error message. ...
Totalizator asked 3/9, 2021 at 8:1

1

Solved

I'm getting a 403 FORBIDDEN error and need to set the TLS version to TLS v1.2 with fetch calls using the node-fetch library. How do I do that?
Hypermetropia asked 30/9, 2023 at 15:29

0

I am trying to implement node-fetch with a react app and Webpack setup. But on using the node-fetch. I am getting tons of errors. ERROR in node:buffer Module build failed: UnhandledSchemeError: R...
Hostess asked 26/4, 2023 at 23:52

3

Solved

I need to get node-fetch working for a VUE JS project but I ran into these dependencies errors: These dependencies were not found: * node:buffer in ./node_modules/node-fetch/src/index.js, ./node_m...
Fordone asked 27/1, 2022 at 20:22

2

Solved

I have started using the native fetch function recently (node 17+) I realized today it is lacking a few functionalities from node-fetch, e.g. agent Why is that? Is there are plan to add it? It is a...
Cayuse asked 22/9, 2022 at 15:42

2

ADP's REST API requires that a SSL certificate and private key be sent with every request. When I use the 'standard, Node.js HTTP(S) module: require('dotenv').config() const fs = require('fs') con...
Michaeline asked 24/3, 2023 at 20:27

1

Copied from here: https://github.com/node-fetch/node-fetch#json ... my code: const fetch = require('node-fetch'); async function doFetch() { const response = await fetch('https://api.github.com/u...
Franck asked 26/4, 2021 at 16:12

3

The issue is that I'm trying to retrieve a OAuth2 token. Since request has been deprecated, I'm using node-fetch for this. While I can get it to work with request, I cannot with node-fetch. I have ...
Xanthine asked 2/7, 2020 at 10:10

2

I have a problem, I know nothing about programming and I want to make an nft collection, I am following this youtube video: https://www.youtube.com/watch?v=AaCgydeMu64 everything went fine until ar...
Braley asked 29/12, 2021 at 22:48

7

Solved

I just use const fetch = require('node-fetch') And I get Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\Alex\Desktop\rollbot\node_modules\node-fetch\src\index.js from C:\Users\Alex\Deskt...
Ranunculus asked 7/9, 2021 at 11:19

4

Solved

Trying to learn, Javascript. Pardon if this is really a basic thin i am missing. I am trying to run node-fetch to a wrong url, and i expect that it should be catched and log my appropriate message...
Olympia asked 31/3, 2018 at 13:19

2

Solved

I am trying to send a POST request with body as form-data since this seems to be the only way that works. I tried this in Postman too and sending body as raw JSON didn't work. So I tried doing the ...
Choreograph asked 11/11, 2020 at 8:3

3

Solved

I'm trying to setup a very simple NPM codebase that I can use to drive an API to do some testing. The line of code causing the error is just import fetch from "node-fetch";, see the code....
Wachtel asked 16/6, 2022 at 6:59

2

Solved

In postman, I can successfully make this request: And get this response: Now I want to do the same request in my server.js file in node.js: const fetch = require('node-fetch') const SEN_URL ...
Fusco asked 15/4, 2018 at 12:37

1

Solved

I am trying to write an integration test in Typescript with Jest which uses node-fetch, like this: import fetch from 'node-fetch'; test('Hello', async () => { await fetch("http://www.goog...
Cimabue asked 21/6, 2022 at 19:18

4

Solved

const guildMembersResponse = fetch(`http://discordapp.com/api/guilds/440494010595803136/members/278628366213709824`, { method: 'PUT', headers: { Authorization: `Bearer TOKEN`, }, }); setTime...
Kiona asked 28/12, 2018 at 17:31

3

I'm using the node-fetch npm module and have a helper function for making authorized requests to a third party service (basically just middleware for adding in the Authorization header). async func...
Cauterize asked 1/5, 2021 at 12:52

1

I wanna get data with Cloud Functions call from Flutter. Here is my code. const functions = require("firebase-functions"); const admin = require('firebase-admin'); const fetch = require('...
Diphase asked 15/10, 2021 at 10:44

2

I am trying to load a JSON file from a url in google cloud. I am using the node-fetch package and it works fine for a couple of hours. The problem is that google changes the redirected url frequent...
Justifier asked 24/6, 2020 at 16:59

5

I am using the imgur api to upload images via a node js app. I am converting images to base64 strings and sending them via Postman works great. I use node-fetch to make api calls. const fetch =...
Emanuelemanuela asked 8/12, 2018 at 16:20

2

I'm trying to upgrade my api to use node-fetch 3.0.0. Part of the breaking changes in their documentation is that node-fetch is now a pure ESM module. https://github.com/node-fetch/node-fetch/blob/...
Inculcate asked 29/9, 2021 at 21:24

4

Solved

I am using this function to call an external API const fetch = require('node-fetch'); fetchdata= async function (result = {}) { var start_time = new Date().getTime(); let response = await fetch...
Argyll asked 21/6, 2020 at 14:37

© 2022 - 2024 — McMap. All rights reserved.