Deep Seek Headers
Immutable, Ktor-free snapshot of HTTP response headers attached to a DeepSeekException.
Provided so that error-handling code does not need to depend on io.ktor.http.Headers and remains stable across Ktor major versions.
Lookups are case-insensitive, matching RFC 7230 semantics. The order of names reflects the insertion order of the backing map.
Example:
try {
client.chat("hello")
} catch (e: DeepSeekException.RateLimitException) {
val retryAfterSeconds = e.headers["Retry-After"]?.toLongOrNull()
// honor retryAfterSeconds before retrying
}Content copied to clipboard