ServiceResponse<T> Class
- java.
lang. Object - com.
microsoft. bot. restclient. ServiceResponse<T>
- com.
Type Parameters
- T
the type of the response
public class ServiceResponse
An instance of this class holds a response object and a raw REST response.
Constructor Summary
Constructor | Description |
---|---|
ServiceResponse(T body, Response<ResponseBody> response) |
Instantiate a Service |
ServiceResponse(Response<Void> headResponse) |
Instantiate a Service |
Method Summary
Modifier and Type | Method and Description |
---|---|
T |
body()
Gets the response object. |
retrofit2.Response<java.lang.Void> |
headResponse()
Gets the raw REST response from a HEAD operation. |
retrofit2.Response<okhttp3.ResponseBody> |
response()
Gets the raw REST response. |
Service |
withBody(T body)
Sets the response object. |
Methods inherited from java.lang.Object
Constructor Details
ServiceResponse
public ServiceResponse(T body, Response
Instantiate a ServiceResponse instance with a response object and a raw REST response.
Parameters:
ServiceResponse
public ServiceResponse(Response
Instantiate a ServiceResponse instance with a response from a HEAD operation.
Parameters:
Method Details
body
public T body()
Gets the response object.
Returns:
headResponse
public Response
Gets the raw REST response from a HEAD operation.
Returns:
response
public Response
Gets the raw REST response.
Returns:
withBody
public ServiceResponse
Sets the response object.
Parameters:
Returns: