title: Not able to update data in sharepoint list using rest [bad request error]
body: <p>Trying to update data in sharepoint <code>list</code> <code>'Details'</code> the fields like <code>name</code>, <code>designation</code> by <code>listItemID</code> used below code but getting bad request error.</p>
  
  <pre><code>$("#edit").click(function () {
  
  var Ownpass = $("#pass").val();
  var Desig = $("#designation").val();
  
  
   var listItemID="IBM/1/2011";
  
  
        $.ajax({
          url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('Details')/items(" + listItemID + ")",
          type: "POST",
          data: JSON.stringify
          ({
              __metadata:
              {
                  type: "SP.Data.DetailsListItem"
              },
  
  
              "Designation": Desig,
  
              "PassportNumber": pass
  
          }),
           headers:
          {
              "Accept": "application/json;odata=verbose",
              "Content-Type": "application/json;odata=verbose",
              "X-RequestDigest": $("#__REQUESTDIGEST").val(),
              "IF-MATCH": "*",
              "X-HTTP-Method": "MERGE"
          },
          success: function (data, status, xhr) {
  
          },
          error: function (xhr, status, error) {
              alert(error);
          }
      });
  });
  </code></pre>
  
  <p>Seeking help here: Thanx in advance</p>