SmartlookNetworkRequest

data class SmartlookNetworkRequest(    var start: Long,     var duration: Long,     var url: URL,     var method: String,     var protocol: String?,     var initiator: String?,     var status: SmartlookNetworkRequest.Status,     var statusCode: Int,     var cached: Boolean,     var requestBody: String?,     var responseBody: String?,     var requestHeaders: MutableMap<String, MutableList<String>>?,     var responseHeaders: MutableMap<String, MutableList<String>>?)

Network request event container. Used to track network requests that can be viewed in devtools.

Constructors

Link copied to clipboard
fun SmartlookNetworkRequest(    duration: Long,     url: URL,     method: String,     protocol: String?,     initiator: String,     status: SmartlookNetworkRequest.Status,     statusCode: Int,     cached: Boolean,     requestBody: String?,     responseBody: String?,     requestHeaders: MutableMap<String, MutableList<String>>? = null,     responseHeaders: MutableMap<String, MutableList<String>>? = null)
Link copied to clipboard
fun SmartlookNetworkRequest(    start: Long,     duration: Long,     url: URL,     method: String,     protocol: String?,     initiator: String?,     status: SmartlookNetworkRequest.Status,     statusCode: Int,     cached: Boolean,     requestBody: String?,     responseBody: String?,     requestHeaders: MutableMap<String, MutableList<String>>?,     responseHeaders: MutableMap<String, MutableList<String>>?)

Types

Link copied to clipboard
enum Status : Enum<SmartlookNetworkRequest.Status>

Used to mark request as successful or failed.

Properties

Link copied to clipboard
var cached: Boolean

TRUE if the response body was obtained from cache.

Link copied to clipboard
var duration: Long

Duration of the request.

Link copied to clipboard
var initiator: String?

The technology/framework used to "execute" the request (e.g. "OkHttp").

Link copied to clipboard
var method: String

Http method.

Link copied to clipboard
var protocol: String?

Protocol used to "execute" the request (e.g. "http/1.1").

Link copied to clipboard
var requestBody: String?

String representation of request body. Maximal allowed number of characters is 10_000 (every character beyond this limit will be dropped).

Link copied to clipboard
var requestHeaders: MutableMap<String, MutableList<String>>?

Map of request headers.

Link copied to clipboard
var responseBody: String?

String representation of response body. Maximal allowed number of characters is 10_000 (every character beyond this limit will be dropped).

Link copied to clipboard
var responseHeaders: MutableMap<String, MutableList<String>>?

Map of response headers.

Link copied to clipboard
var start: Long

Unix timestamp marking the start of request.

Link copied to clipboard
var status: SmartlookNetworkRequest.Status

Used to mark request as successful or failed.

Link copied to clipboard
var statusCode: Int

Http status code.

Link copied to clipboard
var url: URL

Request URL.