Thread overview | ||||||
---|---|---|---|---|---|---|
|
February 01, 2017 Does vibe.d support setting cookies? | ||||
---|---|---|---|---|
| ||||
I can't find it. Like set_cookie() in php. |
February 01, 2017 Re: Does vibe.d support setting cookies? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | V Wed, 01 Feb 2017 14:09:41 +0000 aberba via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> napsáno: > I can't find it. Like set_cookie() in php. I am not sure but I use this in one of my projects import vibe.http.client; auto clientOCX = new RestInterfaceClient!I(host ~ path); string sessionId = clientOCX.initialize(); clientOCX.requestFilter = (HTTPClientRequest req) { req.headers.addField("Cookie", "vibe.session_id=" ~ sessionId ~ "; Path=/; HttpOnly"); }; return clientOCX; |
February 01, 2017 Re: Does vibe.d support setting cookies? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | V Wed, 01 Feb 2017 14:09:41 +0000 aberba via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> napsáno: > I can't find it. Like set_cookie() in php. maybe this http://vibed.org/api/vibe.http.server/HTTPServerResponse.setCookie |
February 01, 2017 Re: Does vibe.d support setting cookies? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | On Wednesday, 1 February 2017 at 14:09:41 UTC, aberba wrote: > I can't find it. Like set_cookie() in php. Yes, it does. http://vibed.org/api/vibe.http.common/HTTPResponse.cookies |
Copyright © 1999-2021 by the D Language Foundation