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

167
Views
cómo usar axios con este cuerpo n js

Tengo problemas para publicar con axios, el cuerpo de mi publicación es:

 { "action": "createRoom", "params": { "name": "cloud-services", "title":"test", "max_users": 50, "guest_login": true } }

Y lo uso axios así:

 async createClassInSkyRoom({ action = "createRoom", name, title, max_users, guest_login }) { const result = await instance().post(Constants.URL_SKYROOM, { action, params: { name, title, max_users, guest_login } }) return result }

y mi instancia es:

 module.exports = () => { const instance = axios.create({}) return instance }

Y me sale el siguiente error:‌

 err: TypeError: Converting circular structure to JSON --> starting at object with constructor 'ClientRequest' | property 'socket' -> object with constructor 'TLSSocket' --- property '_httpMessage' closes the circle at JSON.stringify (<anonymous>) at stringify (/home/firefly/Desktop/project/taha-m/node_modules/express/lib/response.js:1128:12) at ServerResponse.json (/home/firefly/Desktop/project/taha-m/node_modules/express/lib/response.js:260:14) at ResponseHandler.send (/home/firefly/Desktop/project/taha-m/app/Handler/ResponseHandler.js:9:26) at ClassController.goToClassOnSkyRoom (/home/firefly/Desktop/project/taha-m/app/Class/class.controller.js:62:28) at processTicksAndRejections (node:internal/process/task_queues:96:5)
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

¿Ha intentado cambiar el const result = await instance().post(Constants.URL_SKYROOM, { action, params: { name, title, max_users, guest_login } }) a const result = await instance.post(Constants.URL_SKYROOM, { action, params: { name, title, max_users, guest_login } }) . Creo que no es necesario ejecutar Instace directamente

about 4 years ago · Juan Pablo Isaza Report

0

Encontré la solicitud correcta. Gracias a todos

 async createClassInSkyRoom({ action = "createRoom", name, title, max_users, guest_login }) { const result = await instance().post(Constants.URL_SKYROOM, data:{ action, params: { name, title, max_users, guest_login }}) return result }
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!