ajax

ajax

  $.ajax({
    type: "put",
    url: "http://****.com/role",
    contentType: "application/json;charset=utf-8",
    data: JSON.stringify(data),
    dataType: "json",
    beforeSend: function (XMLHttpRequest) {
      XMLHttpRequest.setRequestHeader("Authorization", "s4jnshwag");
    },
    success: function (data) {
      alert(JSON.stringify(data));
    }, error: function (error) {
      console.log(error);
    }
  });

 

posted @ 2023-07-08 09:26  jqynr  阅读(11)  评论(0)    收藏  举报