1 16 17 package org.apache.commons.latka.http; 18 19 import java.net.URL ; 20 import java.io.IOException ; 21 22 29 public interface Request { 30 31 32 public static final int HTTP_METHOD_GET = 0; 33 34 public static final int HTTP_METHOD_POST = 1; 35 36 public static final int HTTP_METHOD_HEAD = 2; 37 38 50 Response execute() throws IOException ; 51 52 59 String getLabel(); 60 61 68 URL getURL(); 69 70 77 void addParameter(String name, String value); 78 79 86 void setParameters(Parameters parameters); 87 88 94 Parameters getParameters(); 95 96 102 void addHeader(String headerName, String headerValue); 103 104 111 void setHeaders(RequestHeaders requestHeaders); 112 113 119 RequestHeaders getHeaders(); 120 121 124 129 Session getSession(); 130 131 138 int getRequestTiming(); 139 140 146 void setCredentials(Credentials credentials); 147 148 153 Credentials getCredentials(); 154 155 161 boolean followRedirects(); 162 163 169 int getMethod(); 170 171 177 void setRequestBody(String body); 178 179 186 void setVersion(String version); 187 188 193 String getVersion(); 194 195 } 196 | Popular Tags |