Octoroom.Cloudflare.HTTP (octoroom v0.1.0)

Copy Markdown View Source

Octoroom.Cloudflare over Cloudflare's HTTP API. Needs :app_id and :app_secret in the config. :request_fun (default &Req.request/1) is for tests.

Calls Cloudflare didn't carry out are retried, up to :attempts in all (default 3) with :backoff_ms (default 200) doubling in between: 429, 502, 503 and 504 for every call, and transport errors (the request may not have arrived) only for GETs, which are safe to repeat. Pulling or pushing twice would add tracks twice.

Summary

Functions

One API call. Returns the decoded body, or an error for HTTP failures and for an error Cloudflare reports at the top level of a 2xx body.

Functions

request(config, method, path, body)

One API call. Returns the decoded body, or an error for HTTP failures and for an error Cloudflare reports at the top level of a 2xx body.