Module z_url_fetch

Fetch (part of) the data of an Url, including its headers.

Copyright © 2014-2021 Marc Worrell

Authors: Marc Worrell.

Description

Fetch (part of) the data of an Url, including its headers.

Data Types

fetch_result()

fetch_result() = {ok, {string(), [{string(), string()}], pos_integer(), binary()}} | {error, term()}

option()

option() = {device, pid()} | {timeout, pos_integer()} | {max_length, pos_integer()} | {authorization, binary() | string()} | {accept, binary() | string()} | {user_agent, binary() | string()} | {language, atom()} | insecure

options()

options() = [option()]

Function Index

ensure_profiles/0
fetch/2Fetch the data and headers from an url.
fetch_partial/1Fetch the first kilobytes of data and headers from an url.
fetch_partial/2Fetch the first N bytes of data and headers from an url, optionally save to the file device.
periodic_cleanup/0
profile/1

Function Details

ensure_profiles/0

ensure_profiles() -> ok

fetch/2

fetch(Url::string() | binary(), Options::options()) -> fetch_result()

Fetch the data and headers from an url

fetch_partial/1

fetch_partial(Url::string() | binary()) -> fetch_result()

Fetch the first kilobytes of data and headers from an url

fetch_partial/2

fetch_partial(DataUrl::string() | binary(), Options::options()) -> fetch_result()

Fetch the first N bytes of data and headers from an url, optionally save to the file device

periodic_cleanup/0

periodic_cleanup() -> ok

profile/1

profile(Url::string() | binary()) -> atom()


Generated by EDoc