When i send a HTTP GET
via ajax, does it includes propers cookies? or cookies goes in the request only when Method is POST
?
Asked
Active
Viewed 36 times
2 Answers
1
A get request should send cookies.
but
AJAX calls only send Cookies if the url you're calling is on the same domain as your calling script.
notice
localhost:3000 and localhost:3001 is not the same domain and treated as cross domain, so no cookies will be sent. (source)

Community
- 1
- 1

aludvigsen
- 5,893
- 3
- 26
- 37
-
Hmm, I think maybe CORS treats that as cross domain... not 100% sure though – aludvigsen Apr 15 '14 at 00:04
0
It should send cookies with either type of request, just like the browser does when following links or submitting a form.

Barmar
- 741,623
- 53
- 500
- 612