Sends a command to the given URL with the provided body and returns a parsed Cqrs.Command.Response in turn.
Sends a command to the given URL and returns a Task containing the parsed Cqrs.Command.Response.
The value contained within the Cqrs.Command.Response, will be the value parsed via the provided decoder.
Constructs the Succeeded variant of a Cqrs.Command.Response.
This is useful for testing how your UI will respond to the happy path, without actually sending a command.
Constructs the Failed variant of a Cqrs.Command.Response.
This is useful for testing how your UI will respond to the sad path, without actually sending a command.
Maps the Succeeded variant of a given Cqrs.Command.Response
Maps the Failed variant of a given Cqrs.Command.Response.
Provides a default case for a Cqrs.Command.Response where the Succeeded variant is in the default () state.
Unwraps a homogeneous Cqrs.Command.Response to its' inner value from the given variant.
Checks if a given Cqrs.Command.Response is a Succeeded variant.
succeeded Succeeded --> True
succeeded (Failed "reason") --> FalseChecks if a given Cqrs.Command.Response is a Failed variant.
failed Succeeded --> False
failed (Failed "reason") --> TrueIf a given Cqrs.Command.Response was unsuccessful, the reason for the failure will be returned.
reason Succeeded --> Nothing
reason (Failed "reason") --> Just "reason"
Represents the possible response states of a command.