/** * Set the session cookie path * @param sessionCookiePath the session cookie path * @return a reference to this, so the API can be used fluently */ public io.vertx.rxjava.ext.web.handler.SessionHandler setSessionCookiePath(String sessionCookiePath) { delegate.setSessionCookiePath(sessionCookiePath); return this; }
/** * Set the session cookie path * @param sessionCookiePath the session cookie path * @return a reference to this, so the API can be used fluently */ public io.vertx.rxjava.ext.web.handler.SessionHandler setSessionCookiePath(String sessionCookiePath) { delegate.setSessionCookiePath(sessionCookiePath); return this; }
@Test public void testSessionCookiePath() throws Exception { router.route().handler(CookieHandler.create()); router.route().handler(SessionHandler.create(store).setSessionCookiePath("/path")); router.route().handler(rc -> rc.response().end()); testRequest(HttpMethod.GET, "/", null, resp -> { String setCookie = resp.headers().get("set-cookie"); assertTrue(setCookie.contains("Path=/path")); }, 200, "OK", null); }
@Test public void testSessionCookiePath() throws Exception { router.route().handler(CookieHandler.create()); router.route().handler(SessionHandler.create(store).setSessionCookiePath("/path")); router.route().handler(rc -> rc.response().end()); testRequest(HttpMethod.GET, "/", null, resp -> { String setCookie = resp.headers().get("set-cookie"); assertTrue(setCookie.contains("Path=/path")); }, 200, "OK", null); }