-
Base.showFunction.
show(x)

Write an informative text representation of a value to the current output stream. New types should overload show(io, x) where the first argument is a stream. The representation used by show generally includes Julia-specific formatting and type information.

source
show(io, mime, x)

The display functions ultimately call show in order to write an object x as a given mime type to a given I/O stream io (usually a memory buffer), if possible. In order to provide a rich multimedia representation of a user-defined type T, it is only necessary to define a new show method for T, via: show(io, ::MIME"mime", x::T) = ..., where mime is a MIME-type string and the function body calls write (or similar) to write that representation of x to io. (Note that the MIME"" notation only supports literal strings; to construct MIME types in a more flexible manner use MIME{Symbol("")}.)

For example, if you define a MyImage type and know how to write it to a PNG file, you could define a function show(io, ::MIME"image/png", x::MyImage) = ... to allow your images to be displayed on any PNG-capable AbstractDisplay (such as IJulia). As usual, be sure to import Base.show in order to add new methods to the built-in Julia function show.

The default MIME type is MIME"text/plain". There is a fallback definition for text/plain output that calls show with 2 arguments. Therefore, this case should be handled by defining a 2-argument show(io::IO, x::MyType) method.

Technically, the MIME"mime" macro defines a singleton type for the given mime string, which allows us to exploit Julia's dispatch mechanisms in determining how to display objects of any given type.

The first argument to show can be an IOContext specifying output format properties. See IOContext for details.

source
mutable struct Params{T}

Collection of key value pairs representing the parameters of the current request - response cycle.

source
mutable struct Route

Representation of a route object

source
mutable struct Channel

Representation of a WebSocket Channel object

source
Missing docstring.

Missing docstring for Dict. Check Documenter's build log for details.

ispayload(req::HTTP.Request)

True if the request can carry a payload - that is, it's a POST, PUT, or PATCH request

source
Genie.Router.routeFunction.

Named Genie routes constructors.

source
Genie.Router.channelFunction.

Named Genie channels constructors.

source

The list of the defined named routes.

source
named_channels() :: Dict{Symbol,Any}

The list of the defined named channels.

source
Genie.Router.routesFunction.
routes() :: Vector{Route}

Returns a vector of defined routes.

source
Genie.Router.channelsFunction.
channels() :: Vector{Channel}

Returns a vector of defined channels.

source
Genie.Router.delete!Function.
delete!(routes, route_name::Symbol)

Removes the route with the corresponding name from the routes collection and returns the collection of remaining routes.

source

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in route_params.

source

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in route_params.

source
Genie.Router.to_linkFunction.

Generates the HTTP link corresponding to route_name using the parameters in route_params.

source
Genie.Router.link_toFunction.

Generates the HTTP link corresponding to route_name using the parameters in route_params.

source
source
source
source
source
source
source
response_type{T}(params::Dict{Symbol,T}) :: Symbol
response_type(params::Params) :: Symbol

Returns the content-type of the current request-response cycle.

source
response_type{T}(check::Symbol, params::Dict{Symbol,T}) :: Bool

Checks if the content-type of the current request-response cycle matches check.

source
is_static_file(resource::String) :: Bool

Checks if the requested resource is a static file.

source
Genie.Router.to_uriFunction.
to_uri(resource::String) :: URI

Attempts to convert resource to URI

source
serve_static_file(resource::String) :: Response

Reads the static file and returns the content as a Response.

source
source
source
source
file_extension(f) :: String

Returns the file extesion of f.

source
file_headers(f) :: Dict{String,String}

Returns the file headers of f.

source