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

622
Views
Cómo convertir la solicitud cURL a axios

Quiero usar el siguiente comando cURL con axios . ¿Como puedo hacer eso?

curl -XPOST -d 'url=https%3A%2F%2Fgoogle.com%2F' 'https://goolnk.com/api/v1/shorten'

Lo he intentado de esta manera, pero parece ser incorrecto:

 axios.post("https://goolnk.com/api/v1/shorten", { url: "https%3A%2F%2Fgoogle.com%2F" }).then(function (response) { console.log(response) })
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Casi lo lograste, pero la clave de url debería ser solo una cadena de enlace, sin ningún símbolo especial.

 axios .post('https://goolnk.com/api/v1/shorten', { url: 'https://google.com' }) .then((res) => { console.log(res.data); });

Por favor, no publique código como imágenes en el futuro, en lugar de eso, insértelo como bloque de código en el texto.

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!