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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidvoidsetRequestBody(byte[] raw, String contentType) Deprecated.voidsetRequestBody(byte[] raw, org.apache.http.entity.ContentType contentType) Sets the request body to the specified raw byte array.voidsetRequestEntity(org.apache.http.HttpEntity requestEntity) voidsetRequestObject(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:
beforeExecutein classRESTCall<org.apache.http.client.methods.HttpPost>
-
addParam
-
setRequestBody(byte[], ContentType)instead