1 19 20 package com.maverick.http; 21 22 import java.io.IOException ; 23 24 28 public class HttpRequest extends HttpHeader { 29 30 static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(HttpRequest.class); 32 34 protected HttpMethod method; 35 int cycles; 36 37 public HttpRequest() { 38 } 39 40 public void performRequest(HttpMethod method, HttpConnection con) throws IOException { 41 42 String request = generateOutput(method.getName() + " " + method.getURI() + " HTTP/" + method.getVersion()); 45 log.debug(request); 47 49 con.getOutputStream().write(request.getBytes()); 50 con.getOutputStream().flush(); 51 } 52 53 void reset() { 54 clearHeaderFields(); 55 } 56 57 } 58 | Popular Tags |