POST-ing XML in AngularJS

后端 未结 2 2024
醉梦人生
醉梦人生 2020-12-20 04:05

I\'ve been looking for hours for some angularjs documentation that explains how to POST xml data using the $http object. Does angular simply not of

2条回答
  •  一整个雨季
    2020-12-20 04:52

    Figured it out. The Content-Type is threw me for a while. Seemed that application/xml made more sense. Oh well, whatever works!

    $http({ 
        method: 'POST',
        url: 'http://10.0.0.123/PHP/itemsGet.php',
        data: '',
        headers: { "Content-Type": 'application/xml' }
    })
    

提交回复
热议问题