Coverage Summary for Class: HttpStatusCodeExtensionsKt (com.javiersc.network.either.ktor._internal)
Class |
Class, %
|
Method, %
|
Branch, %
|
Line, %
|
Instruction, %
|
HttpStatusCodeExtensionsKt |
100%
(1/1)
|
100%
(2/2)
|
100%
(8/8)
|
100%
(2/2)
|
100%
(40/40)
|
package com.javiersc.network.either.ktor._internal
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"))