com.rackspace.deproxy
[Groovy] Class Request
java.lang.Object
com.rackspace.deproxy.Request
class Request
A simple HTTP Request, with method, path, headers, and body.
Constructor Summary |
Request(java.lang.String method, java.lang.String path, java.lang.Object headers = [:], java.lang.Object body = null)
Creates a Request object
|
Method Summary |
java.lang.String
|
toString()
|
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() |
body
java.lang.Object body
-
headers
HeaderCollection headers
-
method
java.lang.String method
-
path
java.lang.String path
-
Request
Request(java.lang.String method, java.lang.String path, java.lang.Object headers = [:], java.lang.Object body = null)
-
Creates a Request object
- Parameters:
method
- The HTTP method to use, such as 'GET', 'POST', or 'PUT'.path
- The path of the resource requested, without host info,
e.g. "/path/to/resource"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.
toString
java.lang.String toString()
-