public boolean returnResponse(int statusCode) { HTTPResponse httpRes = new HTTPResponse(); httpRes.setStatusCode(statusCode); httpRes.setContentLength(0); return post(httpRes); }
public HTTPResponse post(String host, int port, boolean isKeepAlive) HTTPResponse httpRes = new HTTPResponse();
HTTPResponse httpRes = new HTTPResponse(); httpRes.setStatusCode(HTTPStatus.OK); if (contentType != null) {
public boolean returnResponse(int statusCode) { HTTPResponse httpRes = new HTTPResponse(); httpRes.setStatusCode(statusCode); httpRes.setContentLength(0); return post(httpRes); }
public boolean returnResponse(int statusCode) { HTTPResponse httpRes = new HTTPResponse(); httpRes.setStatusCode(statusCode); httpRes.setContentLength(0); return post(httpRes); }
public HTTPResponse post(String host, int port, boolean isKeepAlive) HTTPResponse httpRes = new HTTPResponse();
public HTTPResponse post(String host, int port, boolean isKeepAlive) HTTPResponse httpRes = new HTTPResponse();
public void httpRequestRecieved(HTTPRequest httpReq) { String uri = httpReq.getURI(); if (uri.startsWith(PRESENTATION_URI) == false) { super.httpRequestRecieved(httpReq); return; } Clock clock = Clock.getInstance(); String contents = "<HTML><BODY><H1>" + clock.toString() + "</H1></BODY></HTML>"; HTTPResponse httpRes = new HTTPResponse(); httpRes.setStatusCode(HTTPStatus.OK); httpRes.setContent(contents); httpReq.post(httpRes); }
HTTPResponse httpRes = new HTTPResponse(); httpRes.setContentType(contentType); httpRes.setStatusCode(HTTPStatus.OK);
HTTPResponse httpRes = new HTTPResponse(); httpRes.setContentType(contentType); httpRes.setStatusCode(HTTPStatus.OK);
HTTPResponse httpRes = new HTTPResponse(); httpRes.setStatusCode(HTTPStatus.OK); if (contentType != null) {
HTTPResponse httpRes = new HTTPResponse(); httpRes.setStatusCode(HTTPStatus.OK); if (contentType != null) {