SendNetworkRequestEventSchema
Sends an HTTP request to url with method, headers, body and an optional timeoutMillis, and emits the response downstream. This is the general-purpose way to talk to a backend from inside an event chain.
Response shape: a JSON content type is parsed into plain maps, lists and primitives; anything else is passed through as a raw ByteArray. A JSON body that fails to parse yields null.
incomingData consumed: not used.
Triggers fired:
OnStartEventTrigger— before the request is sent.OnNetworkResponseEventTrigger/OnNetworkFailureEventTrigger— when this event declares an event wired to the response's exact HTTP status: the first for 2xx statuses, the second for the rest. The parsed body is passed as incomingData.OnSuccessEventTrigger— when the response is 2xx and no status-specific event was declared; the parsed body is passed as incomingData.OnFailureEventTrigger— when the response is not 2xx and no status-specific event was declared (the parsed body is passed), and whenever the request itself fails — timeout, no connectivity, and so on — in which case theThrowableis passed and the error is logged.
Exactly one of these outcome triggers fires per response.
Constructors
Properties
This event's own children — each declaring, via its own trigger, which of this event's outgoing triggers runs it. null when this event declares no children.
The condition that must occur for this event to run — matched by structural equality (data class/data object equality) against whatever trigger value fired, never by any kind of subscription or listener registry.