DebugResponse

interface DebugResponse

A response produced by a DebugTab and served by the Lustro runtime.

This is an interface so the runtime serves it; the concrete implementation is internal to this module. Construct instances through the companion object factories. The body is always raw bytes.

Types

Link copied to clipboard
object Companion

Factories for the common response shapes.

Properties

Link copied to clipboard
abstract val body: ByteArray

The raw response body bytes.

Link copied to clipboard
abstract val contentType: MediaType?

The Content-Type of the body, or null if unspecified.

Link copied to clipboard
abstract val headers: Headers

The response headers (excludes the content type). A Content-Security-Policy among them is enforced alongside the server's own policy, so it can only restrict the response further.

Link copied to clipboard
abstract val status: Int

The HTTP status code.