|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vertx.groovy.core.http.HttpClientResponse
class HttpClientResponse
Represents a client-side HTTP response.
An instance of this class is provided to the user via a handler that was specified when one of the HTTP method operations, or the generic HttpClient#request(String, String, Closure)#request(String, String, Closure) method was called on an instance of HttpClient.
It implements ReadStream so it can be used with Pump to pump data with flow control.
Instances of this class are not thread-safe
Constructor Summary | |
protected HttpClientResponse(HttpClientResponse jResponse)
|
Method Summary | |
---|---|
void
|
bodyHandler(groovy.lang.Closure bodyHandler)
Convenience method for receiving the entire request body in one piece. |
void
|
dataHandler(groovy.lang.Closure dataHandler)
{@inheritDoc} |
void
|
endHandler(groovy.lang.Closure endHandler)
{@inheritDoc} |
void
|
exceptionHandler(groovy.lang.Closure exceptionHandler)
{@inheritDoc} |
java.util.Map
|
getHeaders()
@return The headers of the response |
int
|
getStatusCode()
@return The HTTP status code of the response |
java.lang.String
|
getStatusMessage()
@return The HTTP status message of the response |
java.util.Map
|
getTrailers()
@return The trailers of the response |
void
|
pause()
{@inheritDoc} |
void
|
resume()
{@inheritDoc} |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor Detail |
---|
protected HttpClientResponse(HttpClientResponse jResponse)
Method Detail |
---|
void bodyHandler(groovy.lang.Closure bodyHandler)
Don't use this if your request body is large - you could potentially run out of RAM.
bodyHandler
- This handler will be called after all the body has been received
void dataHandler(groovy.lang.Closure dataHandler)
void endHandler(groovy.lang.Closure endHandler)
void exceptionHandler(groovy.lang.Closure exceptionHandler)
java.util.Map getHeaders()
int getStatusCode()
java.lang.String getStatusMessage()
java.util.Map getTrailers()
void pause()
void resume()
Groovy Documentation