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

323
Views
ReactJS Axios Http No se pueden leer las propiedades de undefined (leyendo 'protocolo')

Estoy tratando de vincular esto con el clic de un botón en mi sitio ReactJS. Cuando hago clic en el botón, recibo el error " no capturado (en promesa) TypeError: no se pueden leer las propiedades de undefined (leyendo 'protocolo') "

 async function call () { try { axios({ method: 'post', url: url, header: { "Content-Type": 'application/json', "Authorization": `Bearer ${USER_KEY}` }, data: { prompt: script, temperature: 0, max_dist: 60, stat_request: 1.0, divider: ["\"\"\""] } }).then( res => { console.log(res.json()) } ); } catch (error) { return {statusCode: 500, body: error.toString()} } }

Estoy tratando de convertir la siguiente llamada curl

 curl https://myurlpath.com/test/call \ -H "Content-Type: application/json" \ -H "Authorization: Bearer USERS_KEY" \ -d '{ "prompt": "Please enter your thoughts:\n\"\"\"\nSome Generic paragraph.\n\"\"\"\n", "temperature": 0, "max_dist": 60, "stat_request": 1.0, "divider": ["\"\"\""] }'
about 4 years ago · Juan Pablo Isaza
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!