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

250
Views
¿Cómo convierto el siguiente código php en una llamada a la API JAVASCRIPT fetch?
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://smartly.simaametrics.com/api/qr/:id", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 2, CURLOPT_TIMEOUT => 10, CURLOPT_FOLLOWLOCATION => true, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "Authorization: Bearer NSJcmWkkvxfdteEK", "Content-Type: application/json", ), )); $response = curl_exec($curl); curl_close($curl); echo $response;

¿Cómo convierto lo anterior en javascript para que funcione en el script de la aplicación de Google? Usando arriba, estoy obteniendo valores sobre una identificación específica

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

debes convertir esa respuesta a json usando:

 $json = json_encode($response)

y luego convierta ese json en un objeto javascript usando:

 JSON.parse($json)
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!