slack_webhook_client/operations

Types

pub type BadURL {
  BadURL(String)
}

Constructors

  • BadURL(String)

Values

pub fn post_webhook_request(
  webhook_url: String,
  payload: json.Json,
) -> Result(request.Request(BitArray), BadURL)

Generate a POST request

The request can be passed to

httpc.send_bits()
pub fn post_webhook_response(
  response: response.Response(BitArray),
) -> Result(Int, response.Response(BitArray))

Verify the response

Workflow:

webhook_url
|> post_webhook_request()
|> result.then(httpc.send_bits)
|> result.then(post_webhook_response)
Search Document