Skip to main content

All Questions

Tagged with
0 votes
0 answers
148 views

Gemini API: INVALID_ARGUMENT error when using JavaScript fetch but works with cURL and Go

I can successfully call the Gemini API OpenAI compatibility using this cURL command: curl --request POST \ --url https://generativelanguage.googleapis.com/v1beta/openai/chat/completions \ --header ...
Muhammad Dyas Yaskur's user avatar
0 votes
0 answers
44 views

JavaScript function running on ajax call [duplicate]

I created a php page to process data. Contains HTML form and JavaScript function. Tested the page and it runs well and perfectly. Eg pageprocessor.php On my index page , each time the service is ...
Weaell's user avatar
  • 1
0 votes
0 answers
46 views

Stripe integration results in Network porblem and cors issues

I've been trying to get this API integration to work, when I use postman to try the http://localhost:5001/api/stripe/create-checkout-session POST I get 200k and a session ID in return as well as ...
Erik Galve's user avatar
0 votes
0 answers
55 views

cURL/API body request fails in local, Postman and production NextJS app but works in other environments (reqbin, hoppscotch)

I'm currently developing a mobile app that will have user purchases in it's interface. The payment flow occurs as follows: the user enters payment data in the appropriate fields in the application. ...
lucasrvimieiro's user avatar
0 votes
0 answers
43 views

Sending curl request from js

I was trying to send a request from the fetch() function to my Delhivery API from js application whose format looks like this:- curl --request POST --url "https://track.delhivery.com/api/cmu/...
ADITYA KUMAR's user avatar
0 votes
0 answers
172 views

Databricks SQL REST API w/ Javascript

need to use Databricks SQL Statement Execution API w/ Javascript (see example post ) For some reason, Curl Works, Python works, but Javascript fails. This works : (curl) curl --request POST \ https:/...
Mehdi LAMRANI's user avatar
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 ...
XAZG Неизвестный's user avatar
0 votes
0 answers
78 views

json-server request not found

I can't get index value or URLs but the whole JSON file only. There is no log. Can you help me understand what I did wrong or don't know? Run server --watch/-w can be omitted, JSON Server 1+ watches ...
Raven's user avatar
  • 133
0 votes
0 answers
128 views

Prevent iFrame from opening in a new tab/window

I'm SUUUUPER new to this, so I really hope this isn't a stupid question... Anyway, I'm using cURL and some PHP to embed an interactive activity in my website from this other website. If it helps, I'm ...
user24404171's user avatar
0 votes
1 answer
29 views

How do I log into a site with curl or javascript?

I'm studying the basics of XSRF on Portswigger and I've completed Lab: CSRF vulnerability with no defenses with FireFox. I attempted to go a step further by completing the same lab from the terminal. ...
user avatar
0 votes
1 answer
93 views

POST for data from RESTful API returns valid string when using CURL, but "decoding failed" when using fetch

I have a simple expressjs proxy server relaying requests to a RESTful API and relaying the responses from that API back. If I use CURL to access it, like so: curl -s "http://localhost:3000/api/...
Alexis Purslane's user avatar
-4 votes
1 answer
147 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:...
1.21 gigawatts's user avatar
-1 votes
1 answer
31 views

Empty promise object value from POST curl in JavaScript [duplicate]

I have the following Curl code in JavaScript : function login() { var obj; const outputElement = document.getElementById('output'); return fetch('http://localhost:3000/api-keys', { method:...
John Sall's user avatar
  • 1,163
0 votes
1 answer
338 views

installation failed for deno in ubuntu wsl, zsh: command not found: deno

I am trying to install deno in ubuntu wsl by this curl -fsSL https://deno.land/x/install/install.sh | sh and then i am trying to check my installion by deno --veraion but i am getting zsh: command not ...
Abhay singh's user avatar
0 votes
0 answers
73 views

Curl in PHP to XMLHttpRequest Javascript

I'm trying to convert this CURL in PHP to XML Javascript, but can't find the equivalent of some parameters So I have this in my PHP : $curl = curl_init(); curl_setopt_array($curl, array( ...
Lidya's user avatar
  • 7

15 30 50 per page
1
2 3 4 5
81