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

146
Views
La solicitud de Python funciona, ajax no

Tengo código de solicitudes de trabajo en python y lo necesito en ajax

 var jsonData = {"x":"y"}; $.ajax({ url: url, type: 'POST', data: jsonData, //dataType: "JSON", error: function(e) { console.log(e); } });

json: jsonData, JSON.stringify, 'Content-Type': 'application/json' y el cambio de nombres no funciona, probé muchas cosas, pero cada vez que aparece el error 400

este código python funciona bien

 payload = { 'a':'b', 'a': 'b' } #but it doesn't work with field 'data' or 'params', must be named 'json' r = requests.post(url, json=payload) #data=payload won't work, otherwise error 400 print(r.text)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

intente configurar contentType: "application/json" en ajax

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!