Using DocRaptor web service with AngularJS?

后端 未结 1 1617
北荒
北荒 2021-01-21 12:55

I am trying to generate Excel (.xls) files from an AngularJS app using DocRaptor. I keep getting the following error, when trying just the simple POST request as described in D

相关标签:
1条回答
  • 2021-01-21 13:14

    I was having the same problem. You should be sending -

    data:forDocRaptor
    

    Also, for some reason if you use

    method:'POST'
    

    it works, but $http.post does not

    So - your code would look like this:

    $http({
         method:'POST',
         url: URL,
         data:forDocRaptor
      }).success(function(res){
         console.log(res)
    })
    
    0 讨论(0)
提交回复
热议问题