title: How to update a record using PUT in AJAX
body: <p>I am working on an app that uses SAPUI5 to post data to a local SQL DB through OData. The post method is working and it data is being added in the DB. Now i want to update the record using PUT http request but i am encountering the following error. Data in the JSON is being stored in global variable and passed in JSON object</p>
  
  <p>Help would be greatly appreciated.</p>
  
  <p><a href="https://i.stack.imgur.com/TnYKF.png" rel="nofollow noreferrer">Console error report from the browser.</a>          </p>
  
  <pre><code>         $.ajax({  
                        url: 'http://localhost:3466/products('+ID1+')',
                        type : 'PUT',
                        contentType : 'application/json',
                        processData: false,
                        dataType: 'json',
  
                      data: {
                          "Id":ID1,
                          "Name":Name1,
                          "Cost":Cost1,
                          "Status":Status1,
                          "EmployeeNo":Employee1,
                          "Designation":Designation1,
                          "Destination":Destination1,
                          "PurposeVisit":PurposeVisit1,
                          "BatchNo":BatchNo1,
                          "Modetravel":Modetravel1,
                          "TravelDate":TravelDate1,
                          "DaysNo":DaysNo1,
                          "Stay":Stay1
                      },
  </code></pre>