Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229654

Post data ionic doesn't work

$
0
0

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)

↵ ↵ ↵↵↵ ↵ ↵", status: 500, ok: false, statusText: "Internal Server Error", headers: Headers…}

any idea ?


Viewing all articles
Browse latest Browse all 229654

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>