www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Does vibe.d support setting cookies?

reply aberba <karabutaworld gmail.com> writes:
I can't find it. Like set_cookie() in php.
Feb 01 2017
next sibling parent Daniel =?UTF-8?B?S296w6Fr?= via Digitalmars-d-learn writes:
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
prev sibling next sibling parent Daniel =?UTF-8?B?S296w6Fr?= via Digitalmars-d-learn writes:
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
prev sibling parent Jack Applegame <japplegame gmail.com> writes:
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