URL v0.4.1 URL.Data View Source
Parses a data
URL
Link to this section Summary
Functions
Parse a URI with the :scheme
of “data”
Link to this section Types
Link to this section Functions
Link to this function
parse(uri)
View Source
parse(URI.t()) :: URL.Data.t() | {:error, {module(), binary()}}
Parse a URI with the :scheme
of “data”
Example
iex> data = URI.parse "data:text/plain;base64,SGVsbG8gV29ybGQh"
iex> URL.Data.parse(data)
%URL.Data{
data: "Hello World!",
mediatype: "text/plain",
params: %{"encoding" => "base64"}
}