Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.network/HttpResponse

HttpResponse

data class HttpResponse(val url: URL, val statusCode: Int, val message: String, val headers: Map<String, List<String>>, val body: ByteArray? = null)

Represents the response data for an HTTP response

Parameters

url

The original URL of the request that returned this response

statusCode

The HTTP status code of the response.

message

The response message from java.net.HttpURLConnection if available.

headers

The HTTP response headers for this request

body

Optional body returned by the response

Constructors

HttpResponse
Link copied to clipboard
constructor(url: URL, statusCode: Int, message: String, headers: Map<String, List<String>>, body: ByteArray? = null)

Properties

body
Link copied to clipboard
val body: ByteArray? = null
etag
Link copied to clipboard
val etag: String?

Utility method to retrieve the etag from the headers field.

headers
Link copied to clipboard
val headers: Map<String, List<String>>
message
Link copied to clipboard
val message: String
statusCode
Link copied to clipboard
val statusCode: Int
url
Link copied to clipboard
val url: URL

Functions

bodyText
Link copied to clipboard
@JvmOverloads
fun bodyText(fallbackCharset: Charset = Charsets.UTF_8): String?

Utility method to read the body as a String.

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
Generated by Dokka
(c) Tealium 2026