Error sending xml data

1

I have the following message:

[{erro: "Formato de usuário inválido"}]

Typescript code

var headers = new Headers();
headers.append('Content-Type', 'application/x-www-form-urlencoded');

let urlSearchParams = new URLSearchParams();
    urlSearchParams.append('user', 'meuLogin');
    urlSearchParams.append('pass', 'minhaSenha');
    urlSearchParams.append('cod', 'meuCodigo');
let body = urlSearchParams.toString()

return this.http
  .post('meuXml.asp', body, {headers:headers})
    .map(data => {
      console.log(data.json())
  }, error => {
      console.log(error.json());
  });
    
asked by anonymous 21.03.2018 / 19:19

0 answers