
commonMain.ktor.HttpStatus.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of network-response-jvm Show documentation
Show all versions of network-response-jvm Show documentation
NetworkResponse multiplatform
The newest version!
package com.javiersc.resources.networkResponse.ktor
import io.ktor.http.Headers
import io.ktor.http.HttpStatusCode
import io.ktor.http.headersOf
internal infix fun Int.toHttpStatusCode(message: String): HttpStatusCode {
return HttpStatusCode.allStatusCodes.find { it.value == this } ?: HttpStatusCode(this, message)
}
@PublishedApi
internal val emptyHeader: Headers get() = headersOf("Content-Length", listOf("0"))
© 2015 - 2025 Weber Informatics LLC | Privacy Policy