Package com.atlassian.bamboo.rest.utils
Class Post
java.lang.Object
com.atlassian.bamboo.rest.utils.RESTCall<org.apache.http.client.methods.HttpPost>
com.atlassian.bamboo.rest.utils.Post
- All Implemented Interfaces:
AutoCloseable
- Author:
- Erik van Zijst
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
void
setRequestBody
(byte[] raw, String contentType) Deprecated.void
setRequestBody
(byte[] raw, org.apache.http.entity.ContentType contentType) Sets the request body to the specified raw byte array.void
setRequestEntity
(org.apache.http.HttpEntity requestEntity) void
setRequestObject
(Object obj) Methods inherited from class com.atlassian.bamboo.rest.utils.RESTCall
addRequestHeader, assertExecuted, assertNotExecuted, close, execute, getHttpClientWithTimeout, getMethod, getResponseAsStream, getResponseAsString, getResponseBody, getResponseHeaders, getStatusCode, getStatusLine, getURI, marshal, release, setBasicCredentials, setMarshalledClasses, toString, unmarshal, unmarshal
-
Constructor Details
-
Post
public Post(@NotNull @NotNull org.apache.http.client.HttpClient client, @NotNull @NotNull String url) -
Post
-
-
Method Details
-
setRequestBody
Deprecated.since 6.0 usesetRequestBody(byte[], ContentType)
insteadSets the request body to the specified raw byte array.- Parameters:
raw
-contentType
-
-
setRequestBody
public void setRequestBody(byte[] raw, org.apache.http.entity.ContentType contentType) Sets the request body to the specified raw byte array.- Parameters:
raw
-contentType
-
-
setRequestObject
- Throws:
javax.xml.bind.JAXBException
-
setRequestEntity
public void setRequestEntity(org.apache.http.HttpEntity requestEntity) -
beforeExecute
protected void beforeExecute()- Overrides:
beforeExecute
in classRESTCall<org.apache.http.client.methods.HttpPost>
-
addParam
-
setRequestBody(byte[], ContentType)
instead