Farseer v0.4.4 Farseer.Handlers.Http View Source

Generic HTTP handler. This is also the default handler.

Link to this section Summary

Functions

Finds out whether a request accepts a given mime type. Succeeds if the request accepts / or /*.

Converts the request method to a Tesla method atom, e.g "GET" => :get!

If a route is not found, we want to respond with the a media type the client can understand, or with plain text as last resort.

Sends the request to the configured target.

Link to this section Functions

Link to this function

accepts?(conn, mime_full_type)

View Source

Finds out whether a request accepts a given mime type. Succeeds if the request accepts / or /*.

Link to this function

handle(conn, path_rules, method_rules)

View Source

Converts the request method to a Tesla method atom, e.g "GET" => :get!

If a route is not found, we want to respond with the a media type the client can understand, or with plain text as last resort.

Link to this function

respond(conn, status, body, content_type \\ "text/plain")

View Source

Shorthand to send responses.

Link to this function

send(conn, path_rules, method_rules)

View Source

Sends the request to the configured target.