org.rackspace.deproxy
[Groovy] Class Response

java.lang.Object
  org.rackspace.deproxy.Response

class Response

A simple HTTP Response, with status code, status message, headers, and body.


Property Summary
java.lang.Object body

java.lang.String code

HeaderCollection headers

java.lang.String message

 
Constructor Summary
Response(java.lang.Object code, java.lang.String message = null, java.lang.Object headers = null, java.lang.Object body = null)

Creates a Response object

 
Method Summary
java.lang.String toString()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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()
 

Property Detail

body

java.lang.Object body


code

java.lang.String code


headers

HeaderCollection headers


message

java.lang.String message


 
Constructor Detail

Response

Response(java.lang.Object code, java.lang.String message = null, java.lang.Object headers = null, java.lang.Object body = null)
Creates a Response object
Parameters:
code - A numerical status code. This doesn't have to be a valid HTTP status code; for example, values >= 600 are acceptable also, as are non-numbers.
message - An optional message to go along with the status code. If null, a suitable default will be provided based on the given status code. If code is not a valid HTTP status code, then the default is the empty string.
headers - An optional collection of name/value pairs, either a map, like "['name': 'value']", or a HeaderCollection. Defaults to an empty map.
body - An optional request body. Defaults to the empty string. Both strings and byte arrays are acceptable. All other types are toString'd.


 
Method Detail

toString

@java.lang.Override
java.lang.String toString()