ca.intelliware.amakihi.util.http
Class MultipartPostRequest
java.lang.Object
|
+--ca.intelliware.amakihi.util.http.Request
|
+--ca.intelliware.amakihi.util.http.MultipartPostRequest
- public class MultipartPostRequest
- extends Request
A POST request that handles "multipart/form-data" requests.
This class was implemented with RFC 2045 and RFC 2046 in mind.
Typically, this type of request is sent when using an "upload file"
page. In order to allow file upload, two things must be present in
an HTML form:
- first, there must be an
<input type="file">
in the form; and
- secondly, the form must have a
enctype="multipart/form-data"
attribute.
This class supports the special encoding that must occur on the client
side in order to properly transmit the form data.
- Version:
- $Revision: 1.2 $
- Author:
- Intelliware Development
Fields inherited from class ca.intelliware.amakihi.util.http.Request |
DELETE, GET, HEAD, headers, method, OPTIONS, parameters, POST, PUT, TRACE, url |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
writeTo
protected void writeTo(java.io.OutputStream output)
throws java.io.IOException
- Overrides:
writeTo
in class Request
- See Also:
Request#write(OutputStream)
writeTo
protected void writeTo(java.io.OutputStream output,
NameValuePair pair)
throws java.io.IOException
writeTo
protected void writeTo(java.io.OutputStream output,
NameFilePair pair)
throws java.io.IOException
getHeaders
public NameValuePair[] getHeaders()
Get the headers.
Whatever the caller has provided as headers, we're gonna change the
Content-Type header so that it includes an appropriate boundary.
- Overrides:
getHeaders
in class Request
- Following copied from class:
ca.intelliware.amakihi.util.http.Request
- Returns:
- Returns a NameValuePair[]
Copyright 2002 Intelliware Development. All Rights Reserved.