Ionic 2Angular 2 httpを使用するいくつかのピットについて
1403 ワード
1、サーバはkey=value&key=valueタイプの値を受信するが、サーバはPost要求のbodyの値を取得できない
2、ログイン要求をサーバーに送信した後、サーバーはクッキーを返し、seesionIdが含まれているが、クッキーを取得できず、クッキーも送信できない
:
url?key=value&key=value , body ,
:
1、body , :‘key=value&key=value’
2、 http
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
2、ログイン要求をサーバーに送信した後、サーバーはクッキーを返し、seesionIdが含まれているが、クッキーを取得できず、クッキーも送信できない
:
angular post , cookie,

cookie, session , cookie, post , cookie。
, post option :
this.http.get('http://my.domain.com/request', { withCredentials: true })
, cookie 。
googole Allow-Control-Allow-Origin , cookie
:
1、 Allow-Control-Allow-Origin
2、 nginx , 。 cookie, cookie
nginx :
