WowHttpOptions

class WowHttpOptions @InternalWowApi constructor(val requestFacts: Set<String> = emptySet(), val errorStatuses: Map<String, Int> = emptyMap(), val manifestEndpoint: Boolean = true, val openApiEndpoint: Boolean = true, val clientFacts: Boolean = true, val requestIdHeaders: List<String> = listOf(WowHeaders.REQUEST_ID))

What the host configures of the public routes (and the wow.http.* properties of the host).

  • requestFacts are the request headers copied into a command's headers, as they are named here; a name the framework reserves (Wow-*, wow.*) cannot be one. Beside them the edge records the standard request facts (me.ahoo.wow.api.decide.RequestFacts), which no request header sets: app_id, the caller's authenticated application, and on the public port user_agent and remote_ip, unless clientFacts is off; a listed name that is one of them is not copied.

  • clientFacts records the client's address and User-Agent (remote_ip, user_agent) on the public port's commands, as 9.x did, for audit: personal data that cannot be erased once written, since events are never deleted. Off, neither is recorded.

  • errorStatuses overrides the HTTP status of an error code, a domain rejection's (422 by default) or a framework one's.

  • manifestEndpoint serves GET /wow/manifest; openApiEndpoint serves GET /wow/openapi.

  • requestIdHeaders are the headers a command's request id is read from, the first one present: Wow-Request-Id always first, then one an integration adds, such as CoSec's CoSec-Request-Id, which a CoSec gateway sets on the requests it forwards.

Fields may be added: Wow builds it from the host's configuration, so the constructor is internal to Wow.

Constructors

Link copied to clipboard
constructor(requestFacts: Set<String> = emptySet(), errorStatuses: Map<String, Int> = emptyMap(), manifestEndpoint: Boolean = true, openApiEndpoint: Boolean = true, clientFacts: Boolean = true, requestIdHeaders: List<String> = listOf(WowHeaders.REQUEST_ID))

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copyWith(requestFacts: Set<String> = this.requestFacts, errorStatuses: Map<String, Int> = this.errorStatuses, manifestEndpoint: Boolean = this.manifestEndpoint, openApiEndpoint: Boolean = this.openApiEndpoint, clientFacts: Boolean = this.clientFacts, requestIdHeaders: List<String> = this.requestIdHeaders): WowHttpOptions

This WowHttpOptions with the given fields replaced: Wow's own copy, left out of the ABI.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String