0

I am looking for a JavaScript AJAX request library for browsers that also supports cookies. I tried broswer-request but apparently it does not support cookies.

Any suggestions?

It is also better if it is available for NodeJS through NPM for server side.

Regards

geeko
  • 2,278
  • 1
  • 27
  • 44

1 Answers1

0

I suggest jQuery's functions $.post, $.get, and $.ajax for the ajax requests. You can also edit cookies with jQuery, if you use this plugin.

StackOverFlow Post

Link to file

Community
  • 1
  • 1
Howzieky
  • 819
  • 7
  • 17
  • I will receive the cookie from the server and I need the AJAX library to be able to utilize the cookie in subsequent requests. Does jQuery support this? – geeko Oct 06 '16 at 17:57
  • In the php file, I would imagine you can just use `setcookie()`, but if not, have the php file echo the cookie info, set a callback function in the request, pass the `echo`ed data into that function, and set the cookie with javascript. See http://www.w3schools.com/jquery/ajax_ajax.asp – Howzieky Oct 06 '16 at 18:26