ApiRequest

interface ApiRequest

Immutable representation of the data of a network request

Properties

Link copied to clipboard
abstract val endTime: Long?

Time the response was received, regardless of status

Link copied to clipboard
abstract val headers: Map<String, String>

HTTP Headers

Link copied to clipboard
abstract val httpMethod: String

GET or POST

Link copied to clipboard
abstract val query: Map<String, String>

Query string represented as dictionary

Link copied to clipboard
abstract val queuedTime: Long

Time the request was enqueued

Link copied to clipboard
abstract val requestBody: String?

Render the POST body a string

Link copied to clipboard
abstract val responseBody: String?

Render the response as a string, if the request has been sent Format depends on the endpoint, see Klaviyo API documentation

Link copied to clipboard
abstract val responseCode: Int?

HTTP status code, if the request has been sent

Link copied to clipboard
abstract val startTime: Long?

Time the request was made

Link copied to clipboard
abstract val state: String

Unsent, Inflight, PendingRetry, Complete or Failed

Link copied to clipboard
abstract val type: String

Readable title of this type of request

Link copied to clipboard
abstract val url: URL

URL of the request, omitting query string

Link copied to clipboard
abstract val uuid: String

Unique identifier of this request