|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
HttpRequest is an outgoing request from an HTTP client.
| Field Summary | |
static java.lang.String |
GET_METHOD
|
static java.lang.String |
POST_METHOD
|
| Method Summary | |
void |
addHeader(java.lang.String name,
java.lang.String value)
Adds an HTTP header to the request. |
java.lang.Object |
clone()
Creates a deep copy of the HttpRequest. |
byte[] |
getContent()
Returns the body of the HTTP request. |
java.lang.String |
getHeader(java.lang.String name)
Returns the HTTP header value for the given name. |
java.lang.String[] |
getHeaderNames()
Returns an array of the header name of the HTTP request. |
java.lang.String |
getRequestMethod()
Returning the request's http method, either a "GET" or a "POST", or null if it's not set. |
java.lang.String |
getUri()
Returns the uri destination of the message. |
void |
setContent(byte[] content)
Sets the content of the message to the given byte[] which will be posted to the server. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Add an HTTP header to the request. |
void |
setRequestMethod(java.lang.String method)
This method will set the request http method to either "GET" or "POST" so that the server side scripts will process them accordingly. |
void |
setUri(java.lang.String uri)
Sets the uri destination of the message. |
| Field Detail |
public static final java.lang.String POST_METHOD
public static final java.lang.String GET_METHOD
| Method Detail |
public void setHeader(java.lang.String name,
java.lang.String value)
name - The name of the headervalue - The value of the headerpublic java.lang.String getHeader(java.lang.String name)
name - The name of the header
public void addHeader(java.lang.String name,
java.lang.String value)
name - header namevalue - header valuepublic void setContent(byte[] content)
content - byte array for the content.public byte[] getContent()
public void setUri(java.lang.String uri)
public java.lang.String getUri()
public java.lang.String[] getHeaderNames()
public java.lang.Object clone()
public void setRequestMethod(java.lang.String method)
throws java.lang.IllegalArgumentException
There is no default value for this property. If it's not set, at runtime, Netservice will check if the content is null. If the content is null, NetService will set a flag to let Nexaweb servlet know that this should be processed as a "GET" request, otherwise it will be a "POST" request.
When a user calls NetService.retrieve or retrieveAsynchronously to a URL that is relative to the current application context, the request is not going through the Nexel servlet.
method - string defined by GET_METHOD or POST_METHOD
java.lang.IllegalArgumentExceptionpublic java.lang.String getRequestMethod()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||