0

! , I'm Working On An Application that using JQUERY AJAX to CRUD data , In the Server side I'm using Yii2 framework , so I'm working with its rest. But The Error Is That it doesn't update any data and it returns the same old data There the JS Code

$.ajax({
        url:"rest/jobs/1"
        type: "PUT",
        data: {job:"Assistant"},
        cache: false,
        contentType: false,
        processData: false,

    })
    .done(function(data) {
        console.log(data);
    })
    .fail(function(error) {
        console.log(error);
    });

RESPONSE :

{id: "1", job: "old data"}
4

0 回答 0