rk dudi
Posts: 0
Joined: Thu May 23, 2013 4:27 pm

Cookie using PUT method for a REST service

I'm trying to send a REST request using PUT method. The Cookie value is not being passed. It works fine when I test the service but when used via the app, it fails.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Cookie using PUT method for a REST service

Can you show how is your service setup?

rk dudi
Posts: 0
Joined: Thu May 23, 2013 4:27 pm

Cookie using PUT method for a REST service

I get 2 parameters from service 1 : id and url.
I copied them in local variables. Used alert to make sure that the values are being passed into correctly to those variables.
Then I pass these vaules into service 2. I added some javascript to the request parameter of service 2 to make sure I'm setting the desired header info. into Cookie.
Her's teh javascript:
var str = "visID=" + value;
alert("Cookie:" + str +" and str len:"+ str.length);
return str;
I see the right value being displayed here but it comes as blank on my backend server. I'm using Appery proxy and its still the same.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Cookie using PUT method for a REST service

When you do Test from service it works but when you run from the page (via proxy) it doesn't work?

rk dudi
Posts: 0
Joined: Thu May 23, 2013 4:27 pm

Cookie using PUT method for a REST service

yes, thats correct and the only difference is while testing the service I hardcode the values whereas I'm passing the values using local variables when running from the page. But the values that show up in alert seem to be fine.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Cookie using PUT method for a REST service

I'm not sure if the proxy passes on the cookie. If your service doesn't support cross-domain calls, run Chrome with security disabled and uncheck proxy to see if that works.

http://docs.appery.io/documentation/a...

rk dudi
Posts: 0
Joined: Thu May 23, 2013 4:27 pm

Cookie using PUT method for a REST service

is it possible for you to take a look to see if I'm doing something wrong.

rk dudi
Posts: 0
Joined: Thu May 23, 2013 4:27 pm

Cookie using PUT method for a REST service

is there a way to know what header parameters are being passed by the proxy so I'm sure its not being blocked by Appery.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Cookie using PUT method for a REST service

Hi - Do you tested it with Chrome +security desabled setting - "chrome –disable-web-security"? Were there any errors?

rk dudi
Posts: 0
Joined: Thu May 23, 2013 4:27 pm

Cookie using PUT method for a REST service

I don't see Cookie being sent as part of Header:

Request URL:
http://appery.io/app/rest/tunnel

Code: Select all

 Request Method: 
 DELETE 

 Status Code: 
 HTTP/1.1 404 Not Found 

 Request Headers 
 22:19:48.000 

User-Agent:Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0Referer:http://appery.io/app/view/75915bd3-43...
Authorization:Bearer hwniv1hwh9z1jiqntqxex10wnflxsyx8
appery-rest:2288567
appery-proxy-url:https://api.foundry.att.com/a1/vis/in...
appery-key:1369361965537Accept-Language:en-US,en;q=0.5Accept-Encoding:gzip, deflate
Accept:application/json, text/javascript, /; q=0.01

Code: Select all

 Sent Cookie 
 tracking_id:542c74a9-ee3e-489c-9da9-e0c3f4cc09ccTIGGZI_REFERRER:appery.ioorg.jboss.seam.security.authtoken:P7LaQN9hG6XlT6rXQMmkOszjEZ4pE6OmP3CoEZ4pPMGmPZPXPMGpEYqtPcOrEYqoD3aqD3OpCZSuDZKrD3aqCJ8vJSESSIONIDSSO:BpAsqePUcwnngPvPTGhru2FtJSESSIONID:iowZZtLFObk+hGhxUS8x2rLrhellobar_current:1

Return to “Issues”