1 31 32 package org.apache.commons.httpclient; 33 34 import java.io.IOException ; 35 import java.io.InputStream ; 36 37 52 public interface HttpMethod { 53 54 56 62 String getName(); 63 64 71 HostConfiguration getHostConfiguration(); 72 73 81 void setPath(String path); 82 83 92 String getPath(); 93 94 102 URI getURI() throws URIException; 103 104 115 void setStrictMode(boolean strictMode); 116 117 124 boolean isStrictMode(); 125 126 137 void setRequestHeader(String headerName, String headerValue); 138 139 149 void setRequestHeader(Header header); 150 151 164 void addRequestHeader(String headerName, String headerValue); 165 166 178 void addRequestHeader(Header header); 179 180 189 Header getRequestHeader(String headerName); 190 191 197 void removeRequestHeader(String headerName); 198 199 206 boolean getFollowRedirects(); 207 208 215 void setFollowRedirects(boolean followRedirects); 216 217 227 void setQueryString(String queryString); 228 229 242 void setQueryString(NameValuePair[] params); 243 244 252 String getQueryString(); 253 254 265 Header[] getRequestHeaders(); 266 267 269 274 boolean validate(); 275 276 282 int getStatusCode(); 283 284 291 String getStatusText(); 292 293 299 Header[] getResponseHeaders(); 300 301 311 Header getResponseHeader(String headerName); 312 313 320 Header[] getResponseFooters(); 321 322 329 Header getResponseFooter(String footerName); 330 331 340 byte[] getResponseBody(); 341 342 355 String getResponseBodyAsString(); 356 357 368 InputStream getResponseBodyAsStream() throws IOException ; 369 370 376 boolean hasBeenUsed(); 377 378 380 395 int execute(HttpState state, HttpConnection connection) 396 throws HttpException, IOException ; 397 398 409 void recycle(); 410 411 421 void releaseConnection(); 422 423 433 void addResponseFooter(Header footer); 434 435 443 StatusLine getStatusLine(); 444 445 456 boolean getDoAuthentication(); 457 458 469 void setDoAuthentication(boolean doAuthentication); 470 471 } 472 | Popular Tags |