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

129
Views
Convierta la solicitud de curl con una matriz de objetos en JS axios o solicite la búsqueda

Estoy tratando de convertir esta solicitud:

 curl https://api.stripe.com/v1/payment_links \ -u sk_test_dsgsdgsdgsdgsdyhwetdshsdhsdhsdhsdh: \ -d "line_items[0][price]"=price_1K7o9TFRZ3JYnODMxojDKSWp \ -d "line_items[0][quantity]"=1

a la solicitud de axios: Mi matriz

 const arrayOfPrices = [ { price: 'price_1K7nrWFwZ3JYnODMD6Bb3SEy', quantity: 1 }, ];

Yo he tratado :

 console.log( new URLSearchParams({ arrayOfPrices, }) ); return axios({ method: 'post', url: 'https://api.stripe.com/v1/payment_links', headers: { Authorization: `Bearer ${process.env.STRIPE_PUBLIC_KEY}`, Accept: 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', }, data: new URLSearchParams({ line_items: arrayOfPrices, }) }) .then((res) => res.data) .catch((err) => { console.log(err.response.data); return { status: 'fail', message: err.message }; });

Y más conjuntos diferentes pero no funciona.

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!