Post data ionic doesn't work


#1

I did test in POSTMAN and work, but in my app dont work
In my page register

  newUser(user) {
    this.service.postData(user)
                .subscribe(
                  data => console.log(data),
                  err => console.log(err)
                );
  }

My service-provider

  postData(parameter) {
    let headers = new Headers({ 'Content-Type': 'application/x-www-form-urlencoded' });
    return this.http.post(this.api + 'client', parameter, {
      headers: headers,
      method: 'POST'
    }).map(
      (res: Response) => { return res.json() }
    );
  }

console.log show this is message
POST https://www.mydomine/api/v1/client 500 (Internal Server Error)

↵ ↵ <meta ch…e>↵↵↵ ↵ ↵", status: 500, ok: false, statusText: “Internal Server Error”, headers: Headers…}

any idea ?


#2

The request is not correct and the server responds with an error. Compare the requests exactly.


#3

I’ll review my code here and I’ll come back friend, tks