Reputation: 11391
When i send a HTTP GET
via ajax, does it includes propers cookies? or cookies goes in the request only when Method is POST
?
Upvotes: 0
Views: 40
Reputation: 5981
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)
Upvotes: 1
Reputation: 780974
It should send cookies with either type of request, just like the browser does when following links or submitting a form.
Upvotes: 0