smelt.http¶
Tier: Host — Available in every runtime, including headless mode.
Synchronous HTTP get/post with redirect following and header support. Errors use the (value, err_string) convention.
smelt.http.get¶
Perform a synchronous HTTP GET against url. opts accepts headers, timeout_secs, and max_redirects. Returns ({ status, final_url, body, headers }, nil) on success or (nil, err_string) on failure.
smelt.http.post¶
Perform a synchronous HTTP POST against url with body bytes. opts accepts headers, timeout_secs, and max_redirects. Returns ({ status, final_url, body, headers }, nil) on success or (nil, err_string) on failure.
smelt.http.random_user_agent¶
Return a randomly selected User-Agent string from the built-in pool.