Class OkHttpResponse
- java.lang.Object
-
- cloud.genesys.webmessaging.sdk.connector.okhttp.OkHttpResponse
-
- All Implemented Interfaces:
ApiClientConnectorResponse,AutoCloseable
public class OkHttpResponse extends Object implements ApiClientConnectorResponse
-
-
Constructor Summary
Constructors Constructor Description OkHttpResponse(okhttp3.Response response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()InputStreamgetBody()Map<String,String>getHeaders()intgetStatusCode()StringgetStatusReasonPhrase()booleanhasBody()StringreadBody()
-
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCodein interfaceApiClientConnectorResponse
-
getStatusReasonPhrase
public String getStatusReasonPhrase()
- Specified by:
getStatusReasonPhrasein interfaceApiClientConnectorResponse
-
getHeaders
public Map<String,String> getHeaders()
- Specified by:
getHeadersin interfaceApiClientConnectorResponse
-
hasBody
public boolean hasBody()
- Specified by:
hasBodyin interfaceApiClientConnectorResponse
-
readBody
public String readBody() throws IOException
- Specified by:
readBodyin interfaceApiClientConnectorResponse- Throws:
IOException
-
getBody
public InputStream getBody() throws IOException
- Specified by:
getBodyin interfaceApiClientConnectorResponse- Throws:
IOException
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-