All Questions
726 questions
1
vote
1
answer
30
views
porting curl command to nodejs program: fetch and http2 behaviour is different than curl program
I tried to port this curl command into nodejs program:
curl -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (Linux; Android 13; Generic Android-x86_64) AppleWebKit/537.36 (KHTML, like ...
0
votes
0
answers
18
views
curl.exe command returning formatting error on windows powershell [duplicate]
I'm trying to run this command on powershell. Here I'm trying to overrule the Invoke-Webrequest alias used my microsoft by directly calling curl.exe. I don't think that seems to be the problem. Here ...
1
vote
0
answers
41
views
Nodejs Curl result to file is not saving file
This works perfectly in terminal.
curl -H "Authorization: Bearer sknWtK4sRtd...." "https://mypropect.api.sanity.io/v2021-06-07/data/export/myDataset" > exportedData.ndjson
How ...
0
votes
1
answer
95
views
Understand Prometheus HTTP API result type
I get a big difference when I invoke HTTP API :
1/ via a bash/curl call
2/ via a nodejs/https GET call
Any help appreciated
Thanks
1/
Here is the invocation via bash+curl :
#!/bin/bash
APIKEY="...
0
votes
1
answer
27
views
Node.js and Spotify API integration failing to create playlist
const express = require('express');
const axios = require('axios');
const querystring = require('querystring');
const router = express.Router();
require('dotenv').config();
const client_id = process....
0
votes
1
answer
122
views
External API call timed out using fetch but working using curl
When I make a request to an external API from Node.js using fetch, I end up waiting until it times out. However, when I try the same request directly from the command line using curl, it works.
Fetch ...
0
votes
0
answers
46
views
Downloading images (curl) is not the right way for Linux?
I have a lot of images and there is a function that takes an array of links in each element and runs them through a function to download them and returns links to them, which I then save to the ...
4
votes
2
answers
2k
views
Cannot Download Media from WhatsApp Business API - Working with Postman and cURL - Not working with NodeJS Fetch
I'm having issues trying to download media files from the WhatsApp Business API. Following along with their documentation (https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#...
-4
votes
1
answer
146
views
What is the node js equivalent of this curl command?
I have this curl command that I need to write in node js:
curl -X POST \
https://image.adobe.io/pie/psdService/renditionCreate \
-H "Authorization: Bearer $token" \
-H "x-api-key:...
0
votes
0
answers
249
views
Gen2 Cloud Functions Triggered by Pub/Sub and HTTPS - Receiving Undefined Request in HTTP Trigger
I have a Google Cloud Function (Gen2) that is primarily triggered by Pub/Sub messages. I want to extend its functionality so that it can also be triggered by HTTPS requests. However, I'm encountering ...
1
vote
2
answers
1k
views
Update curl and libcurl to latest version in Docker in NodeJS app
Dockerfile for my NodeJS application looks like the following
FROM node:14-alpine AS build
# Install necessary packages using the 'apk' package manager
RUN apk update && \
apk add --no-...
-1
votes
1
answer
320
views
Why does an api request to a local instance of Gitea timeout
I am trying to migrate a private github repository to a local instance of gitea I've installed in a Docker container on a NAS in my home. I tried the built in migration but after running for about 5 ...
0
votes
1
answer
157
views
NodeJS exec - Getting progress data while running curl instead of api resonse [duplicate]
I am trying to run curl in exec using the below code.
const { exec } = require('child_process');
const shell = (cmd, errMsg) => {
return new Promise((resolve, reject) => {
exec(cmd, ...
1
vote
1
answer
287
views
How do I save a axios POST res / binary stream as a file?
I am using node.js, axios, an fs. I am hitting the vanceai.com api. And when I write the file I am getting a bad file.
Code:
export const imageDownloader = async (transId, name, ext) => {
let ...
-2
votes
1
answer
27
views
Why is my PHP post function format like this when received in NodeJS Express?
guys, I am quite new to PHP and have a function that is trying to post data to my backend NodeJS Express API endpoint.
The received req.body became like this when I received it.
It appended the extra {...