Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49212

Http Post on Ionic 3?

$
0
0

@arekkk wrote:

Hi guys,

Got some issue to proceed a POST request on the latest Ionic.
I pull as a model the Conference App that is my base for my new app now.

When I simply try to do a POST regarding Angular doc :

let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers })

let res = this.http
    .post('http://localhost/auth/login', { identifier, password }, options)
    .subscribe()

console.log(res)

The request is going to the server but in a OPTIONS method (so my server is returning a 304 / 404).
It should go through a POST method with headers application/json, not OPTIONS.
Any idea ?

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49212

Trending Articles



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