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 SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionBean property getter:content .Bean property getter:method .getUri()Bean property getter:url .booleanIdentifies whether this HTTP method typically has content.hasContent(boolean value) Overrides the default value for thehasContent()method.static RestOperationCreator.static RestOperationCreator.
- 
Field Details- 
NO_BODYA 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- 
RestOperationConstructor.- 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 to- String using- toString() 
 
- body- The HTTP body.
 
 
- 
- 
Method Details- 
ofCreator.- 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 to- String using- toString() 
 
- Returns:
- A new RestOperationobject.
 
- 
ofCreator.- 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 to- String using- toString() 
 
- body- The HTTP body.
- Returns:
- A new RestOperationobject.
 
- 
getUriBean property getter:url .- Returns:
- The value of the url property on this bean, ornull if it is not set.
 
- 
getMethodBean property getter:method .- Returns:
- The value of the method property on this bean, ornull if it is not set.
 
- 
getContentBean property getter:content .- Returns:
- The value of the content property on this bean.
 ReturnsNO_BODYif the request does not have a body set.
 Anull value meansnull should be the serialized response.
 
- 
hasContentIdentifies whether this HTTP method typically has content.- Returns:
- true if this HTTP method typically has content.
 
- 
hasContentOverrides the default value for thehasContent()method.- Parameters:
- value- The new value.
- Returns:
- This object.
 
 
-