Cizen.Effects.Request (Cizen v0.17.0) View Source

An effect to request.

Returns the response event or timeout event.

When used, it accepts the following options:

  • :body - requested event.
  • :timeout - timeout for response (Defaults to 5000 milliseconds).

Example

response_or_timeout_event =
  perform id, %Effects.Request{
    body: some_request,
    timeout: 300
  }