public class DefaultBoxResponse extends Object implements IBoxResponse
| Constructor and Description |
|---|
DefaultBoxResponse(org.apache.http.HttpResponse httpResponse)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getExpectedResponseCode()
Get the expected http response status code.
|
org.apache.http.HttpResponse |
getHttpResponse()
Get the raw HttpResponse.
|
int |
getResponseStatusCode()
Get the response status code.
|
Object |
parseResponse(IBoxResponseParser responseParser,
IBoxResponseParser errorParser)
Parese HttpResponse into IResponseObject.
|
void |
setExpectedResponseCode(int code)
Set expected response http status code, in case the response have different response code, the response will be treated as error.
|
public DefaultBoxResponse(org.apache.http.HttpResponse httpResponse)
httpResponse - raw http response.public org.apache.http.HttpResponse getHttpResponse()
public int getResponseStatusCode()
public Object parseResponse(IBoxResponseParser responseParser, IBoxResponseParser errorParser) throws BoxRestException
IBoxResponseparseResponse in interface IBoxResponseBoxRestExceptionpublic void setExpectedResponseCode(int code)
code - expected response http status code.public int getExpectedResponseCode()
Copyright © 2014. All Rights Reserved.