Package com.microsoft.rest
Class ServiceResponseWithHeaders<TBody,THeader>
- java.lang.Object
-
- com.microsoft.rest.ServiceResponse<TBody>
-
- com.microsoft.rest.ServiceResponseWithHeaders<TBody,THeader>
-
- Type Parameters:
TBody- the type of the responseTHeader- the type of the response header object
public final class ServiceResponseWithHeaders<TBody,THeader> extends ServiceResponse<TBody>
An instance of this class holds a response object and a raw REST response.
-
-
Constructor Summary
Constructors Constructor Description ServiceResponseWithHeaders(TBody body, THeader headers, retrofit2.Response<okhttp3.ResponseBody> response)Instantiate a ServiceResponse instance with a response object and a raw REST response.ServiceResponseWithHeaders(THeader headers, retrofit2.Response<Void> response)Instantiate a ServiceResponse instance with a response object and a raw REST response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description THeaderheaders()Gets the response headers.-
Methods inherited from class com.microsoft.rest.ServiceResponse
body, headResponse, response, withBody
-
-
-
-
Constructor Detail
-
ServiceResponseWithHeaders
public ServiceResponseWithHeaders(TBody body, THeader headers, retrofit2.Response<okhttp3.ResponseBody> response)
Instantiate a ServiceResponse instance with a response object and a raw REST response.- Parameters:
body- deserialized response objectheaders- deserialized response header objectresponse- raw REST response
-
-
Method Detail
-
headers
public THeader headers()
Gets the response headers.- Returns:
- the response headers. Null if there isn't one.
-
-