0

https://www.getpostman.com/collections/4961d6259eff467838fb

我在 jQuery ajax 中获得成功。但在 Angular http 帖子中的工作方式不同。


$http({
                        method: "POST",
                        url: 'http://sysdatacenter.com/WS/DataService.svc/Customer',
                        data: '[{"AddressArabic":"fgdfgdfg","AddressEnglish":"fw4534sdv","BusinessCategoryID":3,"CityID":3,"Comments":null,"CompanyName":"rwerwer","CompanyNameArabic":"ssdfgdfgd","ContactNo":3534535,"ContactPerson":"sdfsdfsd","CreatedBy":"admin","CreatedDate":"06-10-2016 12:19:25","CustomerCode":"werw","CustomerID":1,"DeviceTaskID":null,"Email":"rwerwrw@sfsdf.dgd","Fax":3453453,"Flexfld1":null,"Flexfld2":null,"Flexfld3":null,"Flexfld4":null,"Flexfld5":null,"IsActive":1,"IsSync":1,"ModifiedBy":"admin","ModifiedDate":"06-10-2016 12:19:25","POBox":345,"TradeLicenseNo":"erwe","TradeLicenseNoArabic":"gdfgdfgd","TransactionType":"I"},{"AddressArabic":"fgdfgdfg","AddressEnglish":"fw4534sdv","BusinessCategoryID":3,"CityID":3,"Comments":null,"CompanyName":"rwerwer","CompanyNameArabic":"ssdfgdfgd","ContactNo":3534535,"ContactPerson":"sdfsdfsd","CreatedBy":"admin","CreatedDate":"06-10-2016 12:19:25","CustomerCode":"werw","CustomerID":1,"DeviceTaskID":null,"Email":"rwerwrw@sfsdf.dgd","Fax":3453453,"Flexfld1":null,"Flexfld2":null,"Flexfld3":null,"Flexfld4":null,"Flexfld5":null,"IsActive":1,"IsSync":1,"ModifiedBy":"admin","ModifiedDate":"06-10-2016 12:19:25","POBox":345,"TradeLicenseNo":"erwe","TradeLicenseNoArabic":"gdfgdfgd","TransactionType":"I"}]',
                        headers: {"deviceid":"ABC1234"}
                    }).then(function (data, status, headers, config) {
                    console.log(r)

                    }, function (err) {


                        });

4

0 回答 0