com.atlassian.bamboo.rest.utils
package.
Please remove the dependency to httpclient from bamboo-core when removing this class.@Deprecated public abstract class RESTCall<M extends org.apache.commons.httpclient.HttpMethod> extends Object
Modifier | Constructor and Description |
---|---|
protected |
RESTCall(org.apache.commons.httpclient.HttpClient client,
M method)
Deprecated.
|
protected |
RESTCall(M method)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addRequestHeader(String key,
String value)
Deprecated.
|
protected void |
assertExecuted()
Deprecated.
|
protected void |
assertNotExecuted()
Deprecated.
|
void |
execute()
Deprecated.
|
M |
getMethod()
Deprecated.
|
InputStream |
getResponseAsStream()
Deprecated.
|
byte[] |
getResponseBody()
Deprecated.
Returns the response body as a byte array.
|
int |
getStatusCode()
Deprecated.
|
URI |
getURI()
Deprecated.
|
protected void |
marshal(Object obj,
OutputStream out)
Deprecated.
|
void |
release()
Deprecated.
Releases the resources held by the underlying HTTP request.
|
void |
setBasicCredentials(String username,
String password)
Deprecated.
Configured this call to use Basic HTTP Authentication using the specified username and password.
|
void |
setClientProxy()
Deprecated.
|
void |
setMarshalledClasses(Class... classes)
Deprecated.
|
<T> T |
unmarshal(Class<T> responseType)
Deprecated.
|
protected Object |
unmarshal(InputStream in)
Deprecated.
|
protected RESTCall(org.apache.commons.httpclient.HttpClient client, M method)
protected RESTCall(M method)
public void setMarshalledClasses(Class... classes) throws JAXBException
JAXBException
protected void marshal(Object obj, OutputStream out) throws JAXBException
JAXBException
protected Object unmarshal(InputStream in) throws JAXBException
JAXBException
public <T> T unmarshal(Class<T> responseType) throws IOException, JAXBException
IOException
JAXBException
public void setBasicCredentials(String username, String password)
username
- password
- public void setClientProxy()
public void execute()
public int getStatusCode()
public byte[] getResponseBody()
This assertion must be called after the call has been executed sucessfully, or it will fail the test.
public InputStream getResponseAsStream() throws IOException
IOException
public URI getURI() throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
public void release()
protected void assertExecuted()
protected void assertNotExecuted()
public M getMethod()
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.