Not Receiving Set-Cookie Header with axios post request

前端 未结 4 1626
囚心锁ツ
囚心锁ツ 2020-12-19 18:08

I have a PHP Script which successfully returns some simple Headers as well as a set-cookie header if called directly in the browser (or by postman). I can read the response-

4条回答
  •  离开以前
    2020-12-19 19:09

    For me is working adding {withCredentials: true} like this:

    axios
    .post(url, {
        foo: foo,
        baz: baz,
        }, {withCredentials: true})
    .then(.............
    

提交回复
热议问题