Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

get session cookie from REST API login page

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.

Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

get session cookie from REST API login page

Hi Donald,

Have you been able to resolve this issue?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

get session cookie from REST API login page

Hello,

Do you need our help?

Neel Suresh Sus
Posts: 0
Joined: Fri Jun 07, 2013 7:48 am

get session cookie from REST API login page

I'm having the same problem (ticket 7329)

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

get session cookie from REST API login page

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

Return to “Issues”