Page 2 of 2

Cookie using PUT method for a REST service

Posted: Fri May 24, 2013 7:46 am
by Maryna Brodina

Hello! If you test in browser check console - are there any errors? Cookies are sent automatically. The easiest way to send cookies is to set them first:

1) uncheck in request parameters Header (for Cookie)
2) In JS in mapping to cookie you need to set cookie. You can do that with jquery plugin - jquery.cookie. So in mapping instead of code
codevar str = "visID=" + value;
alert("Cookie:" + str +" and str len:"+ str.length);
return str; /code
should be
code$.cookie("visID", value);/code
3) link up that plugin (create new JS asset and paste the code from https://raw.github.com/carhartl/jquer...)


Cookie using PUT method for a REST service

Posted: Fri May 24, 2013 10:53 am
by rk dudi

There's no error in browser console except getting a 404 for the 2nd service request due to the cookie value not being passed.
I unchecked the request parameter header now and created a JS and copied the code as you mentioned but still got the same response.
Shouldn't I be seeing the Cookie value in the request headers that are being sent from Appery proxy ? I don't see that. Let me know if you want to take a look at my code to see what's going on.

BTW, I tried using chrome with disabled security and still see the same issue.


Cookie using PUT method for a REST service

Posted: Sat May 25, 2013 3:24 am
by rk dudi

I still don't see the custom Cookie value in either cookie or Header.


Cookie using PUT method for a REST service

Posted: Sat May 25, 2013 4:42 am
by Igor

Please make your app link public and send us that link.