Отправка необработанных данных json на сервер: AngularJS, Ionic

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

Я получаю сообщение об успехе в JQuery AJAX. Но не работает то же самое в англоязычном 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) {


                        });

0 ответов

Другие вопросы по тегам