Using DocRaptor web service with AngularJS?

后端 未结 1 1615
北荒
北荒 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)
提交回复
热议问题