Package com.openai.core.http
Interface HttpResponse
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public interface HttpResponse implements AutoCloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
HttpResponse.Handler
-
Method Summary
Modifier and Type Method Description abstract Integer
statusCode()
abstract Headers
headers()
Optional<String>
requestId()
Returns the value of the x-request-id
header, or an empty Optional if there's no such header in the response.abstract InputStream
body()
abstract Unit
close()
Overridden from AutoCloseable to not have a checked exception in its signature. -
-
Method Detail
-
statusCode
abstract Integer statusCode()
-
requestId
Optional<String> requestId()
Returns the value of the
x-request-id
header, or an empty Optional if there's no such header in the response.
-
body
abstract InputStream body()
-
close
abstract Unit close()
Overridden from AutoCloseable to not have a checked exception in its signature.
-
-
-
-