且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用离子的post方法将数据发送到服务器

更新时间:2023-01-01 16:47:21

我正在使用此代码并使用各种方法 GET / POST / DELETE

I am using this code and works with various methods GET/POST/DELETE

$http({
       method: method,//GET-POST
       url: url,
       data: data,
       dataType: 'json',
       headers: {
           "Content-Type": "application/json"
       }
}).success(function (data) {//Success handling

}).error(function (data, status) {//Error handling

});

问候。