1 29 30 31 package org.apache.commons.httpclient; 32 33 38 public class FakeHttpMethod extends HttpMethodBase{ 39 40 public FakeHttpMethod(){ 41 super(); 42 } 43 44 public FakeHttpMethod(String path){ 45 super(path); 46 } 47 48 public String getName() { 49 return "Simple"; 50 } 51 52 public void addResponseHeader(final Header header) { 53 getResponseHeaderGroup().addHeader(header); 54 } 55 56 public String generateRequestLine( 57 final HttpConnection connection ,final HttpVersion version) { 58 if (connection == null) { 59 throw new IllegalArgumentException ("Connection may not be null"); 60 } 61 if (version == null) { 62 throw new IllegalArgumentException ("HTTP version may not be null"); 63 } 64 return HttpMethodBase.generateRequestLine(connection, 65 this.getName(), this.getPath(), this.getQueryString(), version.toString()); 66 } 67 68 } 69 | Popular Tags |