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

107
Views
HTTP PUT REQUEST TO API

HI am trying to make an HTTP PUT request to my API. I am getting back the error 405 and 415 depending on how I change the URL.

The ID I am trying to change is 26 and I want to change the testDesc to test5.

Any ideas? Thank you for your time.

function httpPut() {
  $.ajax({
    url: "https://someurl/Test/26",
    type: "PUT",
    'data': {
      testDesc: "test5",
    },
  }).done(function(data) {
    document.getElementById("testingBox7").innerHTML = JSON.stringify(data);
  });
};
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found a solution:

function httpPut(newName) {
  var myString = "https://https://someurl/Test/";
  $.ajax({
    url: myString + newName,
    type: "PUT",
    processData: false,
    contentType: "application/json; charset=UTF-8",
    data: JSON.stringify(data)
  }).done(function(data) {
    document.getElementById("testingBox7").innerHTML = JSON.stringify(data);
  });
};
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!