Copyright © 2021 Marc Worrell
Authors: Marc Worrell (marc@worrell.nl).
as_data_url/3 | Fetch data from an URL. |
error_msg/2 | Map (http) errors to readable format. |
fetch/3 | Fetch data from an URL. |
fetch_json/3 | Fetch JSON data from an URL. |
fetch_partial/3 | Fetch data from an URL. |
metadata/3 | Fetch the metadata from an URL. |
as_data_url(Url::string() | binary() | undefined, Options::z_url_fetch:options(), Context::z:contex()) -> {ok, binary()} | {error, term()}
Fetch data from an URL. Return the data as a data url.
error_msg(S4xx::integer() | {error, term()}, Context::z:context()) -> binary()
Map (http) errors to readable format.
fetch(Url::string() | binary(), Options::z_url_fetch:options(), Context::z:context()) -> z_url_fetch:fetch_result()
Fetch data from an URL. Let modules change the fetch options.
fetch_json(Url::string() | binary(), Options::z_url_fetch:options(), Context::z:context()) -> {ok, term()} | {error, term()}
Fetch JSON data from an URL. Let modules change the fetch options. On success, the returned body is parsed with jsxrecord and returned.
fetch_partial(Url::string() | binary(), Options::z_url_fetch:options(), Context::z:context()) -> z_url_fetch:fetch_result()
Fetch data from an URL. Let modules change the fetch options.
metadata(Url::string() | binary(), Options::z_url_fetch:options(), Context::z:context()) -> {ok, z_url_metadat:metadata()} | {error, term()}
Fetch the metadata from an URL. Let modules change the fetch options.
Generated by EDoc