@Override public int getStatusCode() { return status.getCode(); }
@Override public int getStatusCode() { return status.getCode(); }
private boolean mustNotHaveBody() { int code = status.getCode(); return (code >= 100 && code < 200) || code == 204 || code == 304; }
String ncsaLogFormat(HostAndPort client, String rfc1413Ident, Optional<CharSequence> userId, Instant timestamp, HttpMethod method, String uri, String httpProtocol, Status status, String responseSize) { return String.format("%s %s %s [%s] \"%s %s %s\" %d %s", client.getHost(), rfc1413Ident, userId.orElse("-"), FORMATTER.format(timestamp), method.getName(), uri, httpProtocol, status.getCode(), responseSize); } }
public void sendResponse() { int statusCode = response.getStatus().getCode(); if (statusCode >= 400) { context.clientError(statusCode); } else { response.send(MediaType.TEXT_HTML, responseContent); } }