@Override public int getServerPort() { String defaultPort = request.secure() ? "443" : "80"; String[] split = request.host().split(":"); String portStr = split.length > 1 ? split[1] : defaultPort; return Integer.parseInt(portStr); }
@Override public int getServerPort() { String defaultPort = request.secure() ? "443" : "80"; String[] split = request.host().split(":"); String portStr = split.length > 1 ? split[1] : defaultPort; return Integer.parseInt(portStr); }
@Override public boolean isSecure() { return request.secure(); }
@Override public boolean isSecure() { return request.secure(); }
public String absoluteURL(Http.Request request) { return absoluteURL(request.secure(), request.host()); }
@Override public boolean isSecure() { return request.secure(); }
@Override public String getScheme() { if (request.secure()) { return "https"; } else { return "http"; } }
@Override public String getScheme() { if (request.secure()) { return "https"; } else { return "http"; } }
@Override public String getScheme() { if (request.secure()) { return "https"; } else { return "http"; } }
/** * Transform this call to an absolute URL. * * @param request used to identify the host and protocol that should base this absolute URL * @return the absolute URL string */ public String absoluteURL(Http.Request request) { return absoluteURL(request.secure(), request.host()); }
/** * Transform this call to an absolute URL. */ public String absoluteURL(Http.Request request) { return absoluteURL(request.secure(), request.host()); }
/** * Transform this call to an WebSocket URL. * * @param request used as the base for forming the WS url * @return the websocket url string */ public String webSocketURL(Http.Request request) { return webSocketURL(request.secure(), request.host()); }
/** * Transform this call to an absolute URL. * * @param request used to identify the host and protocol that should base this absolute URL * @return the absolute URL string */ public String absoluteURL(Http.Request request) { return absoluteURL(request.secure(), request.host()); }
/** * Transform this call to an WebSocket URL. */ public String webSocketURL(Http.Request request) { return webSocketURL(request.secure(), request.host()); }
/** * Transform this call to an absolute URL. * * @param request used to identify the host and protocol that should base this absolute URL * @return the absolute URL string */ public String absoluteURL(Http.Request request) { return absoluteURL(request.secure(), request.host()); }
/** * Transform this call to an WebSocket URL. * * @param request used as the base for forming the WS url * @return the websocket url string */ public String webSocketURL(Http.Request request) { return webSocketURL(request.secure(), request.host()); }
/** * Transform this call to an WebSocket URL. * * @param request used as the base for forming the WS url * @return the websocket url string */ public String webSocketURL(Http.Request request) { return webSocketURL(request.secure(), request.host()); }