Class HttpFormRequest
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.internal.http.HttpRequest
-
- org.codehaus.cargo.container.internal.http.HttpFormRequest
-
- All Implemented Interfaces:
Loggable
public class HttpFormRequest extends HttpRequest
HTTP request which posts a form represented as a child ofFormContentType.
-
-
Field Summary
-
Fields inherited from class org.codehaus.cargo.container.internal.http.HttpRequest
BUFFER_CHUNK_SIZE
-
-
Constructor Summary
Constructors Constructor Description HttpFormRequest(URL url, FormContentType formData)HttpFormRequest(URL url, FormContentType formData, long timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidwriteOutputStream(HttpURLConnection connection)If necessary, writes to the output stream of the HTTP URL connection.-
Methods inherited from class org.codehaus.cargo.container.internal.http.HttpRequest
addRequestProperty, delete, extractCharset, extractHeaderComponent, get, post, put, setAuthentication, setRequestBody
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
-
-
-
-
Constructor Detail
-
HttpFormRequest
public HttpFormRequest(URL url, FormContentType formData)
- Parameters:
url- URL to be called.formData- Form data to be sent by HTTP form request.- See Also:
HttpRequest(URL)
-
HttpFormRequest
public HttpFormRequest(URL url, FormContentType formData, long timeout)
- Parameters:
url- URL to be called.formData- Form data to be sent by HTTP form request.timeout- Request timeout.- See Also:
HttpRequest(URL, long)
-
-
Method Detail
-
writeOutputStream
protected void writeOutputStream(HttpURLConnection connection) throws IOException
If necessary, writes to the output stream of the HTTP URL connection. By default, theHttpRequest.requestBodyis written as output.- Overrides:
writeOutputStreamin classHttpRequest- Parameters:
connection- the HTTP URL connection to read from- Throws:
IOException- if an error happens during the connection establishment or write
-
-