wpcom.ex v0.3.0 Wpcom.Req View Source

Low-level request functionality for WP.com REST API.

Accepts GET or POST types. Optional headers. JSON body.

Link to this section Summary

Link to this section Types

Link to this type

http_header()

View Source
http_header() :: {String.t(), String.t()}
Link to this type

http_headers()

View Source
http_headers() :: [http_header()]
Link to this type

http_response()

View Source
http_response() ::
  {:ok, String.t() | map()} | {:error, Mojito.error()} | no_return()

Link to this section Functions

Link to this function

request(method, url, custom_headers \\ [], body \\ "")

View Source
request(:get | :post, String.t(), http_headers(), String.t() | map()) ::
  http_response()

Make a request to WP.com REST API.