Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

327
Views
Integración de GetResponse Api El uso de fetch () no funciona

La integración de GetResponse Api El uso del método Fetch API no funciona

El siguiente SMS se muestra en la consola:

 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.getresponse.com/v3/contacts. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

El código se da a continuación:

// principal.js

 // POST request using fetch() fetch("https://api.getresponse.com/v3/contacts", { // Adding method type method: "POST", // Adding body or contents to send body: JSON.stringify( { campaign : { campaignId: "5D8Qm" }, name: "xyz", email: "fdfdfd@gmail.com" } ), // Adding headers to the request headers: { "X-Auth-Token": "api-key o9q5s264jbp9dws0nsevnagqdst81esh", "Content-type": "application/json" } }) // Converting to JSON .then(response => response.json()) // Displaying results to console .then(json => console.log(json));
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Es un problema clásico de CORS como dijo azbarcea .

En cuanto a su comentario sobre por qué cURL funciona pero Fetch API no, puede consultar esta respuesta en Stack Overflow.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!