Package org.apache.juneau.rest.client
Class RestOperation
java.lang.Object
org.apache.juneau.rest.client.RestOperation
Aggregates the HTTP method, URL, and optional body into a single bean.
See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionBean property getter:content .Bean property getter:method .getUri()
Bean property getter:url .boolean
Identifies whether this HTTP method typically has content.hasContent
(boolean value) Overrides the default value for thehasContent()
method.static RestOperation
Creator.static RestOperation
Creator.
-
Field Details
-
NO_BODY
A placeholder for a non-existent body. Used to identify when form-data should be used in a request body. Note that this is different than anull body since anull can be a serialized request.
-
-
Constructor Details
-
RestOperation
Constructor.- Parameters:
method
- The HTTP method.url
- The URI of the remote REST resource.
Can be any of the following types:URIBuilder
URI
URL
String
Object
- Converted toString usingtoString()
body
- The HTTP body.
-
-
Method Details
-
of
Creator.- Parameters:
method
- The HTTP method.url
- The URI of the remote REST resource.
Can be any of the following types:URIBuilder
URI
URL
String
Object
- Converted toString usingtoString()
- Returns:
- A new
RestOperation
object.
-
of
Creator.- Parameters:
method
- The HTTP method.url
- The URI of the remote REST resource.
Can be any of the following types:URIBuilder
URI
URL
String
Object
- Converted toString usingtoString()
body
- The HTTP body.- Returns:
- A new
RestOperation
object.
-
getUri
Bean property getter:url .- Returns:
- The value of the
url property on this bean, ornull if it is not set.
-
getMethod
Bean property getter:method .- Returns:
- The value of the
method property on this bean, ornull if it is not set.
-
getContent
Bean property getter:content .- Returns:
- The value of the
content property on this bean.
ReturnsNO_BODY
if the request does not have a body set.
Anull value meansnull should be the serialized response.
-
hasContent
Identifies whether this HTTP method typically has content.- Returns:
true if this HTTP method typically has content.
-
hasContent
Overrides the default value for thehasContent()
method.- Parameters:
value
- The new value.- Returns:
- This object.
-