View Source Spaceboy.Specification (Spaceboy v0.3.2)
Check if the request received is according to specification.
https://gitlab.com/gemini-specification/protocol/-/blob/master/specification.gmi
Summary
Functions
Check the received data against Gemini specification
Functions
@spec check(data :: binary(), opts :: Keyword.t()) :: {:ok, URI.t()} | {:error, String.t()} | {:error, integer(), String.t()}
Check the received data against Gemini specification
Examples
iex> Spaceboy.Specification.check("gemini://localhost/\r\n")
{:ok, %URI{authority: "localhost", host: "localhost", path: "/", scheme: "gemini"}}