|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ucsb.nceas.morpho.framework.HttpMessage
This class includes code to handle 'cookies' by looking at request and response headers. If the Sun url handlers are used, this code is used However, if the HttpClient class is used as the url handler, that class handles cookies internally and strips the information out of the headers before this class looks at them. This the cookie handler included here will never be called! DFH - October 2003
Constructor Summary | |
HttpMessage(java.net.URL servlet)
|
Method Summary | |
static java.lang.String |
getCookie()
return the cookie that this message object contains |
java.io.InputStream |
sendGetMessage()
Performs a GET request to the previously given servlet with no query string |
java.io.InputStream |
sendGetMessage(java.util.Properties args)
Performs a GET request to the previously given servlet Builds a query string from the supplied Properties list. |
java.io.InputStream |
sendPostData(java.util.Properties args)
Sends post data using url encoding. |
java.io.InputStream |
sendPostData(java.util.Properties args,
java.util.Properties fileNames)
Sends post data using multipart/form-data encoding. |
java.io.InputStream |
sendPostMessage()
Performs a POST request with no query parameters |
java.io.InputStream |
sendPostMessage(java.util.Properties args)
Deprecated. Replaced by #sendPostData(Properties args) |
static void |
setCookie(java.lang.String newCookie)
return the cookie that this message object contains |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HttpMessage(java.net.URL servlet)
Method Detail |
public java.io.InputStream sendGetMessage() throws java.io.IOException
java.io.IOException
public java.io.InputStream sendGetMessage(java.util.Properties args) throws java.io.IOException
java.io.IOException
public java.io.InputStream sendPostData(java.util.Properties args, java.util.Properties fileNames) throws java.io.IOException
args
- a property file containing the name-value pairs that are to be
sent to the serverfileNames
- a property file containing the name for a formfield
that represents a file and the filename (as the property value)
java.io.IOException
- If any file operation fails.public java.io.InputStream sendPostData(java.util.Properties args) throws java.io.IOException
args
- a property file containing the name-value pairs that are to be
sent to the server
java.io.IOException
- If any file operation fails.public java.io.InputStream sendPostMessage() throws java.io.IOException
java.io.IOException
public java.io.InputStream sendPostMessage(java.util.Properties args) throws java.io.IOException
args
- a property file containing the name-value pairs that are to be
sent to the server
java.io.IOException
- If any file operation fails.sendPostData(Properties args)
public static java.lang.String getCookie()
public static void setCookie(java.lang.String newCookie)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |