Skip to content

HTTP

See HTTP requests for more information on how to perform HTTP requests from Bubblescript.

http_async_cancel(handle)

Cancel an async HTTP request.

The request may have already been executed. This always returns :ok.

http_async_status(handle)

Get the status of an async HTTP request.

Returns a map with one of the following:

%{status: :waiting}

# value is the same as the normal return values from the http methods.
%{status: :done, value: value}

%{status: :error, error: %{reason: string}}

http_delete(url, opts \\ [])

Perform an HTTP DELETE request.

http_get(url, opts \\ [])

Perform an HTTP GET request.

http_head(url, opts \\ [])

Perform an HTTP HEAD request.

http_options(url, opts \\ [])

Perform an HTTP OPTIONS request.

http_patch(url, opts \\ [])

Perform an HTTP PATCH request.

http_post(url, opts \\ [])

Perform an HTTP POST request.

http_put(url, opts \\ [])

Perform an HTTP PUT request.

http_request(method, url, opts \\ [])

Perform a parameterized HTTP request.

http_trace(url, opts \\ [])

Perform an HTTP TRACE request.