diff --git a/openai-java-core/src/main/kotlin/com/openai/core/http/HttpResponse.kt b/openai-java-core/src/main/kotlin/com/openai/core/http/HttpResponse.kt index 495acfd4a..6ceea355d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/core/http/HttpResponse.kt +++ b/openai-java-core/src/main/kotlin/com/openai/core/http/HttpResponse.kt @@ -11,6 +11,10 @@ interface HttpResponse : AutoCloseable { fun headers(): Headers + /** + * Returns the value of the `x-request-id` header, or an empty [Optional] if there's no such + * header in the response. + */ fun requestId(): Optional = Optional.ofNullable(headers().values("x-request-id").firstOrNull())