|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.larkc.core.pluginManager.remote.Servlet.Tomcat.servlet.HttpRequest
public class HttpRequest
Builds various HTTP requests (GET, PUT, POST, DELETE) to interact with remote plug-ins.
Field Summary | |
---|---|
java.lang.String |
UTF8
Constant to indicate that utf-8 encoding is used. |
Constructor Summary | |
---|---|
HttpRequest(java.lang.String url)
Constructor. |
Method Summary | |
---|---|
void |
addParameter(java.lang.String parameter,
java.lang.String value)
Adds a parameter to the parameter map. |
void |
open()
Open. |
java.io.OutputStream |
openForWriting()
Open for writing. |
java.io.InputStream |
read()
Read. |
java.lang.String |
readAsString()
Read as string. |
void |
setBody(java.lang.String body)
Sets the body. |
void |
setContentType(java.lang.String contentType)
Sets the content type. |
void |
setDeleteMethod()
Sets the delete method. |
void |
setGetMethod()
Sets the get method. |
void |
setMethod(java.lang.String method)
Sets the method. |
void |
setPostMethod()
Sets the post method. |
void |
setPutMethod()
Sets the put method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.lang.String UTF8
Constructor Detail |
---|
public HttpRequest(java.lang.String url)
url
- target URL of the HTTP request.Method Detail |
---|
public void addParameter(java.lang.String parameter, java.lang.String value)
parameter
- name of the parameter, used as a key for the parameter mapvalue
- parameter valuepublic void setMethod(java.lang.String method)
method
- the new methodpublic void setGetMethod()
public void setPutMethod()
public void setPostMethod()
public void setDeleteMethod()
public void setContentType(java.lang.String contentType)
contentType
- the new content typepublic void setBody(java.lang.String body)
body
- the new bodypublic java.io.OutputStream openForWriting() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.public void open() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.public java.io.InputStream read() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.public java.lang.String readAsString() throws java.io.IOException
java.io.IOException
- Signals that an I/O exception has occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |