public class OkHttpResponseDelegate extends Object implements ResponseDelegate
| Constructor and Description |
|---|
OkHttpResponseDelegate(okhttp3.Response response) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
body() |
InputStream |
bodyStream() |
void |
close() |
int |
code() |
String |
contentType() |
String[] |
header(String name) |
String[] |
headerNames() |
public OkHttpResponseDelegate(okhttp3.Response response)
throws IOException
IOExceptionpublic int code()
code in interface ResponseDelegatepublic byte[] body()
throws IOException
body in interface ResponseDelegateIOExceptionpublic InputStream bodyStream() throws IOException
bodyStream in interface ResponseDelegateIOExceptionpublic String[] header(String name)
header in interface ResponseDelegatepublic String[] headerNames()
headerNames in interface ResponseDelegatepublic String contentType()
contentType in interface ResponseDelegatepublic void close()
throws Exception
close in interface AutoCloseableclose in interface ResponseDelegateExceptionCopyright © 2019. All rights reserved.