wpcom.ex v0.3.0 Wpcom.Cast View Source
Asynchronous HTTP request functions with infinite exponential retry to the WordPress.com REST API.
This cast functionality makes zero guarentees about order of delivery. It is highly suggested that all operations be idempotent.
We rely on WP.com API's incredible uptime and expected recovery times in failure cases in our assumptions below.
Link to this section Summary
Functions
Aliased to post/3. Performs asynchronous DELETE request to the WP.com API
Performs asynchronous POST request to the WP.com API.
Aliased to post/3. Performs asynchronous POST request to the WP.com API
Link to this section Functions
del(path, headers)
View Sourcedel(String.t(), Wpcom.Req.http_headers()) :: {:ok, pid()}
Aliased to post/3. Performs asynchronous DELETE request to the WP.com API
post(path, body, headers \\ [])
View Sourcepost(String.t(), %{} | String.t(), Wpcom.Req.http_headers()) :: {:ok, pid()}
Performs asynchronous POST request to the WP.com API.
The request is fired off in an unsupervised task that does an exponential backoff up to the the backoff cap and then continues retrying (indefinitely) at that pace.
put(path, body, headers \\ [])
View Sourceput(String.t(), %{} | String.t(), Wpcom.Req.http_headers()) :: {:ok, pid()}
Aliased to post/3. Performs asynchronous POST request to the WP.com API