wax v0.7.10 WhatsappApiBaseRequest

Base module to handle requests and retries

Link to this section Summary

Functions

Check rates and make the request. If something goes wrong, it will retry up to 3 times. When the max attempts is exceeded it will return a {:error, :max_attempts_exceeded}

Link to this section Functions

Link to this function check_rate_and_prepare_request(module, url, method, params, attempts)
check_rate_and_prepare_request(
  module(),
  String.t(),
  atom(),
  list(),
  non_neg_integer()
) :: HTTPoison.Response.t() | {:error, :max_attempts_exceeded}

Check rates and make the request. If something goes wrong, it will retry up to 3 times. When the max attempts is exceeded it will return a {:error, :max_attempts_exceeded}