M
M
Misha Kogan2015-06-13 13:52:43
JavaScript
Misha Kogan, 2015-06-13 13:52:43

How to send http post xml request using angularjs and how to handle response?

How to send http post xml request using angularjs and how to handle response?
Request example:

URL для передачи запроса:	http://shop.digiseller.ru/xml/shop_categories.asp
<digiseller.request>
  <seller>
    <id>505197</id>
  </seller>
  <category>
    <id></id>
  </category>
  <lang></lang>
</digiseller.request>

Answer example:
<digiseller.response>
<retval></retval>
<retdesc></retdesc>
<categories>
  <category cnt="" sub="">
    <id></id>
    <name></name>
  </category>
  <category cnt="" sub="">
    <id></id>
    <name></name>
      <category cnt="" sub="">
        <id></id>
        <name></name>
        ...
      </category>
  </category>
  ...
</categories>
</digiseller.response>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
IceJOKER, 2015-06-13
@IceJOKER

Here's how:
5mdW5G6hagwMr1.png... Or did you think that now someone would write code for you specifically for your case?

4
4ikist, 2015-06-13
@4ikist

function someCtrl($http){
$http.post('/some/url', {xml: '<xml…'}).success(function(response){});
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question