Skip to content

Instantly share code, notes, and snippets.

@bradorego
Created December 17, 2013 21:35
Show Gist options
  • Save bradorego/8012976 to your computer and use it in GitHub Desktop.
Save bradorego/8012976 to your computer and use it in GitHub Desktop.
setting cookies in vertx
if (pg_android) {
var exdate = new Date();
exdate.setDate(exdate.getDate() + 365);
/// I tried it on the request, too, but it got weird...
// req.headers().set("Cookie", headers.getAll('Cookie').toString() + ";pg_android=1; path=/; expires=" + exdate.toUTCString());
req.response.putHeader("Cookie", "pg_android=1; path=/; expires=" + exdate.toUTCString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment