List Task Creation in Shaerpoint Server using REST API

List Task Creation in Shaerpoint Server using REST API

Hi guys my task is to create a task in list in sharepoint sever 2013 using REST concept..I tried this code but i don't know where i am lagging..My code is 
  1.  function createListItem(webUrl, listName, itemProperties, success, failure) {
  2.                 alert("hoi hello method");
  3.                 $.ajax({
  4.                     url: webUrl + "/_vti_bin/listdata.svc/" + listName,
  5.                     type: "POST",
  6.                     processData: false,
  7.                     contentType: "application/json;odata=verbose",
  8.                     data: JSON.stringify(itemProperties),
  9.                     async:true,
  10.                     headers: {
  11.                         "Accept": "application/json;odata=verbose"
  12.                     },
  13.                     success: function (data) {
  14.                         alert("hoi");
  15.                         success(data.d);
  16.                     },
  17.                     error: function (data) {
  18.                         failure(data.responseJSON.error);
  19.                         alert("Error");
  20.                     }
  21.                 });
  22.             }


  23.             //Usage: create task
  24.             var taskProperties = {
  25.                 'TaskName': 'Order_Approval',
  26.                 'AssignedToId': 12
  27.             };
  28.             $(document).ready(function () {
  29.                 createListItem('http://sp20139:85', 'list_rest', taskProperties, function (task) {
  30.                         alert('list_rest' + task.TaskName + ' has been created');
  31.             },
  32.             function (error) {
  33.                 console.log(JSON.stringify(error));
  34.             });
  35.         });
Please help me out guys