digitalmars.D.learn - Does vibe.d support setting cookies?
- aberba (1/1) Feb 01 2017 I can't find it. Like set_cookie() in php.
- Daniel =?UTF-8?B?S296w6Fr?= via Digitalmars-d-learn (11/12) Feb 01 2017 V Wed, 01 Feb 2017 14:09:41 +0000
- Daniel =?UTF-8?B?S296w6Fr?= via Digitalmars-d-learn (5/6) Feb 01 2017 V Wed, 01 Feb 2017 14:09:41 +0000
- Jack Applegame (3/4) Feb 01 2017 Yes, it does.
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;
Feb 01 2017
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
Feb 01 2017
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
Feb 01 2017