Package com.styra.opa.openapi.utils
Class Utils.HttpResponseCached
- java.lang.Object
-
- com.styra.opa.openapi.utils.Utils.HttpResponseCached
-
- All Implemented Interfaces:
java.net.http.HttpResponse<java.io.InputStream>
- Enclosing class:
- Utils
public static final class Utils.HttpResponseCached extends java.lang.Object implements java.net.http.HttpResponse<java.io.InputStream>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.net.http.HttpResponse
java.net.http.HttpResponse.BodyHandler<T extends java.lang.Object>, java.net.http.HttpResponse.BodyHandlers, java.net.http.HttpResponse.BodySubscriber<T extends java.lang.Object>, java.net.http.HttpResponse.BodySubscribers, java.net.http.HttpResponse.PushPromiseHandler<T extends java.lang.Object>, java.net.http.HttpResponse.ResponseInfo
-
-
Constructor Summary
Constructors Constructor Description HttpResponseCached(java.net.http.HttpResponse<java.io.InputStream> response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStream
body()
byte[]
bodyAsBytes()
java.lang.String
bodyAsUtf8()
java.net.http.HttpHeaders
headers()
java.util.Optional<java.net.http.HttpResponse<java.io.InputStream>>
previousResponse()
java.net.http.HttpRequest
request()
java.util.Optional<javax.net.ssl.SSLSession>
sslSession()
int
statusCode()
java.lang.String
toString()
java.net.URI
uri()
java.net.http.HttpClient.Version
version()
-
-
-
Method Detail
-
bodyAsUtf8
public java.lang.String bodyAsUtf8()
-
bodyAsBytes
public byte[] bodyAsBytes()
-
statusCode
public int statusCode()
- Specified by:
statusCode
in interfacejava.net.http.HttpResponse<java.io.InputStream>
-
request
public java.net.http.HttpRequest request()
- Specified by:
request
in interfacejava.net.http.HttpResponse<java.io.InputStream>
-
previousResponse
public java.util.Optional<java.net.http.HttpResponse<java.io.InputStream>> previousResponse()
- Specified by:
previousResponse
in interfacejava.net.http.HttpResponse<java.io.InputStream>
-
headers
public java.net.http.HttpHeaders headers()
- Specified by:
headers
in interfacejava.net.http.HttpResponse<java.io.InputStream>
-
body
public java.io.InputStream body()
- Specified by:
body
in interfacejava.net.http.HttpResponse<java.io.InputStream>
-
sslSession
public java.util.Optional<javax.net.ssl.SSLSession> sslSession()
- Specified by:
sslSession
in interfacejava.net.http.HttpResponse<java.io.InputStream>
-
uri
public java.net.URI uri()
- Specified by:
uri
in interfacejava.net.http.HttpResponse<java.io.InputStream>
-
version
public java.net.http.HttpClient.Version version()
- Specified by:
version
in interfacejava.net.http.HttpResponse<java.io.InputStream>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-