public class PostRequest extends BaseRequest implements IPostRequest
functionOptions, queryOptions, REQUEST_STATS_HEADER_VALUE_FORMAT_STRING
Constructor and Description |
---|
PostRequest(java.lang.String requestUrl,
IBaseClient client,
java.util.List<? extends Option> requestOptions)
The request for the Post
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
Delete this item from the service
|
void |
delete(ICallback<Post> callback)
Delete this item from the service
|
IPostRequest |
expand(java.lang.String value)
Sets the expand clause for the request
|
Post |
get()
Gets the Post from the service
|
void |
get(ICallback<Post> callback)
Gets the Post from the service
|
Post |
patch(Post sourcePost)
Patches this Post with a source
|
void |
patch(Post sourcePost,
ICallback<Post> callback)
Patches this Post with a source
|
Post |
post(Post newPost)
Creates a Post with a new object
|
void |
post(Post newPost,
ICallback<Post> callback)
Creates a Post with a new object
|
IPostRequest |
select(java.lang.String value)
Sets the select clause for the request
|
addFunctionOption, addHeader, addQueryOption, getClient, getFunctionOptions, getHeaders, getHttpMethod, getOptions, getQueryOptions, getRequestUrl, getResponseType, getUseCaches, send, send, setHttpMethod, setUseCaches
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addHeader, getHeaders, getHttpMethod, getOptions, getRequestUrl, getUseCaches, setUseCaches
public PostRequest(java.lang.String requestUrl, IBaseClient client, java.util.List<? extends Option> requestOptions)
requestUrl
- the request URLclient
- the service clientrequestOptions
- the options for this requestpublic void get(ICallback<Post> callback)
get
in interface IPostRequest
callback
- the callback to be called after success or failurepublic Post get() throws ClientException
get
in interface IPostRequest
ClientException
- this exception occurs if the request was unable to complete for any reasonpublic void delete(ICallback<Post> callback)
delete
in interface IPostRequest
callback
- the callback when the deletion action has completedpublic void delete() throws ClientException
delete
in interface IPostRequest
ClientException
- if there was an exception during the delete operationpublic void patch(Post sourcePost, ICallback<Post> callback)
patch
in interface IPostRequest
sourcePost
- the source object with updatescallback
- the callback to be called after success or failurepublic Post patch(Post sourcePost) throws ClientException
patch
in interface IPostRequest
sourcePost
- the source object with updatesClientException
- this exception occurs if the request was unable to complete for any reasonpublic void post(Post newPost, ICallback<Post> callback)
post
in interface IPostRequest
newPost
- the new object to createcallback
- the callback to be called after success or failurepublic Post post(Post newPost) throws ClientException
post
in interface IPostRequest
newPost
- the new object to createClientException
- this exception occurs if the request was unable to complete for any reasonpublic IPostRequest select(java.lang.String value)
select
in interface IPostRequest
value
- the select clausepublic IPostRequest expand(java.lang.String value)
expand
in interface IPostRequest
value
- the expand clause