Questions tagged [node-fetch]

462 questions
1
vote
1 answer

Discord.js | How can I fetch users linked accounts information

Im trying to code a bot that fetch data from faceit link user give and compare it with users linked Riot Games accounts username. I want to check if user connected his Discord account to Riot Games account and if its connected, I want to fetch…
GrkmDgn
  • 37
  • 7
1
vote
0 answers

How to login to a Spring login form using node-fetch

I have access to a Spring application via a username and password from my browser and I want to login from a NodeJS application. I followed the post (How to login to a spring security login form using cURL?), which allowed me to successfully use…
Alexandre Annic
  • 9,942
  • 5
  • 36
  • 50
1
vote
1 answer

Can you use PollyJS with Node 18 native fetch?

I've been using PollyJS to record HTTP traffic via node-fetch and it's working well and as intended. I'm currently chasing my tail trying to switch this out for Node 18 native/built-in fetch which seems to be API compatible. I'm intentionally not…
Guy
  • 65,082
  • 97
  • 254
  • 325
1
vote
1 answer

Repetitive prompting with validation in Inquirer.js when using a validation function featuring fetch

In the context of Inquirer.js, one of my question-prompts involves a validation function to check if the user-supplied Github username exists. This validation function uses an fetch function in order to check if the Github username exits. The…
shau
  • 15
  • 4
1
vote
0 answers

node-fetch & netlify function "Class extends value # is not a constructor or null"
netlify site name: https://liontime-api-redirect.netlify.app/ error image link you can see this image when you open the site above too. I built a proxy server with netlify function. It worked well at local development environment. But after…
Chun
  • 13
  • 4
1
vote
1 answer

How to pass Github Auth token in Node Fetch?

I'm currently dealing with API rate: API rate limit exceeded. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) I've tried multiple different methods, but seems like I'm…
Fill
  • 377
  • 2
  • 15
1
vote
0 answers

node-fetch invalid header token

this is the code i tried to run but I am constantly getting same error. If I remove cookie from headers it works but I need cookies just like this format."cookie": "username=admin" import fetch from…
1
vote
1 answer

fetch + big-json - How to return a json stream?

In my app I need to fetch a big json (>600MB) - I'd like to be able to fetch it from my api or from the file on my disk depending on the settings - unfortunately I cannot do JSON.parse because I get an exception that my json string is bigger than…
Clyde Barrow
  • 1,924
  • 8
  • 30
  • 60
1
vote
1 answer

Recursively sending http requests using data from json response

I'm trying to extract all names from an API that returns a JSON with the following structure: { "data" : [ { "attributes" : { "name" : "Prog1" ... }, "id" : "12345", …
Lien
  • 88
  • 6
1
vote
0 answers

http POST request works in VSCode testing, but doesn't work with node-fetch in lambda function

I have a lambda function that moderates input before calling the OpenAI API. It works perfectly in sam local, as well as directly in Visual Studio Code (not through my lambda URL). When I use my lambda function, I get this error: { "error": { …
Joel Hager
  • 2,990
  • 3
  • 15
  • 44
1
vote
1 answer

Node Fetch cannot get header value from headers object

I have some code using the node-fetch API to make an HTTP request. The code is the following: fetch('/home.html', { body, method: 'POST', headers, withCredentials: true, //validateStatus: () => true, redirect: 'manual' }) …
LuisAFK
  • 846
  • 4
  • 22
1
vote
0 answers

unable to verify the first certificate - node fetch

I try to get data from this api: https://www.meteoromania.ro/wp-json/meteoapi/v2/starea-vremii, when I implemented the function it worked but now after some time, I get the following error: Error getting RoMeteo data: FetchError: request to…
t3nsa
  • 680
  • 6
  • 21
1
vote
0 answers

FetchError: request to https://rf-werf.rdvd.com:3000/v1/locales failed, reason: connect ECONNREFUSED fe80::9030:9b22:8639:bfb3:3000

I am working on one windows application where one layer is built on top of Node.js where we basically calling one language API to get the list of languages. Earlier when we were using Node v16.14.2, node-fetch -: 3.2.9, OS -: Windows10. It was…
1
vote
1 answer

Conditional import with ES Module ( fetch / node-fetch )

I'm writting a JS code that can be use eather for Node application or for JavaScript web browser application. Since Node 17.5 it's now possible to use the native fetch API from JavaScript. I wonder if there is a way to use a kind of conditinal…
nem0z
  • 1,060
  • 1
  • 4
  • 17
1
vote
0 answers

GitHub API authorization works with node-fetch v2 but not with v3

I have the following fetch request that works fine with node-fetch v2.6.0: const url = "https://github.developer.mycompany.io/api/v3/search/code?q=%3Cnxt+extension%3Ats+extension%3Ahtml+repo%3Aawesome/repo&per_page=100" const options = { agent:…
Juuro
  • 1,487
  • 5
  • 16
  • 27