Page 2 of 2

get session cookie from REST API login page

Posted: Tue May 20, 2014 4:11 am
by Yurii Orishchuk

Hello.

Please provide us your app public link.

Describe steps to reproduce this problem.

Also it would be fine if you describe what do you expect and what is realy have.

Thanks & regards.


get session cookie from REST API login page

Posted: Fri May 23, 2014 7:39 pm
by Dupdroid

Hi Donald,

Have you been able to resolve this issue?


get session cookie from REST API login page

Posted: Tue Jun 10, 2014 2:30 pm
by Kateryna Grynko

Hello,

Do you need our help?


get session cookie from REST API login page

Posted: Sat Jan 31, 2015 3:38 am
by Neel Suresh Sus

I'm having the same problem (ticket 7329)


get session cookie from REST API login page

Posted: Mon Feb 02, 2015 2:13 am
by Yurii Orishchuk

Hi Neel,

The problem you have faced with is a restriction of set "Set-Cookie" header.

You can find the reason of this problem here: http://stackoverflow.com/questions/74...

But you can receive this header using server code.

Here is steps to do it:

  1. create server code.
    Simple tutorial how to use it: http://devcenter.appery.io/tutorials/...

  2. populate this code with following JS code:

    precode

    var sendURL = "https://btcunifi.raderhosting.com:8443/login?login=login&username=xxxx&password=yyyy&quot

    var XHRResponse = XHR.send("POST", sendURL,
    {
    "status": "sent"
    }
    );

    var goalCookie = "no defined&quot
    if(XHRResponse.headers["Set-Cookie"])
    goalCookie = /unifises\=([^;]+)/gi.exec(XHRResponse.headers["Set-Cookie"])[1];

    response.success({"unifises": goalCookie}, "application/json");

    /code/pre

    Save and test it.

    Regards