title: Bad request error while posting from ajax
body: <p>Hi am trying to pass data through ajax and getting Bad request error any help please</p>
  
  <pre><code> $scope.getSubCategory = function(id)
         {
             var category_id=id;
              var data = {"CategoryId":"2"};
             $.ajax({
                      url: "http://cashobby.abhigna.info/Services/CashobbyService.svc/subCategory",
                      type: "POST",
                      crossDomain : true,
                      dataType: "json",
                      data:data,
                      success: function (data) {
                              console.log(data);
  
                      },
                      //if wrong otp shoe user a error message
  
                      error: function (error) {
                          console.log(error);
                          // alert(request.responseText);
                      }
                  });
         }
  </code></pre>
  
  <p>please check the error<a href="https://i.stack.imgur.com/8RvMh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8RvMh.jpg" alt="enter image description here"></a></p>
  
  <p>any help please I have tried to pass data <code>'{"CategoryId":"2"}';</code> and through <code>JSON.strinify</code> but no help any suggestion</p>