class Stremio::Addon::DevKit::StremioRouteHandler
Overview
Some older stremio clients (ie: Android TV) incorrectly encode paths, so they're incompatible with https://datatracker.ietf.org/doc/html/rfc3986#section-2.3 Specifically, "_,.,- and ~" are encoded by these clients (rfc3986 says they should NOT). This class will encode strings in a way that's compatible with these non-conforming clients
Direct Known Subclasses
Defined in:
stremio-addon-devkit/stremio_route_handler.crClass Method Summary
-
.encode(path : String) : String
Encodes a string such that older stremio clients can access the urls ie: "foo-bar" === "foo%2Dbar"
Instance Method Summary
-
#add_route(method : String, path : String, &handler : HTTP::Server::Context -> _)
Anytime routes are added, we'll also add an optional redirect if any parameters need to be escaped for non-compliant stremio clients
Instance methods inherited from class Stremio::Addon::DevKit::RouteHandler
add_route(method : String, path : String, &handler : HTTP::Server::Context -> _)
add_route,
call(context : HTTP::Server::Context)
call,
delete(path : String, &block : HTTP::Server::Context -> _)
delete,
get(path : String, &block : HTTP::Server::Context -> _)
get,
lookup_route(verb : String, path : String)
lookup_route,
options(path : String, &block : HTTP::Server::Context -> _)
options,
patch(path : String, &block : HTTP::Server::Context -> _)
patch,
post(path : String, &block : HTTP::Server::Context -> _)
post,
put(path : String, &block : HTTP::Server::Context -> _)
put
Constructor methods inherited from class Stremio::Addon::DevKit::RouteHandler
new
new
Class methods inherited from class Stremio::Addon::DevKit::RouteHandler
redirect(env : HTTP::Server::Context, url : String, status_code : Int32 = 302, *, body : String | Nil = nil, close : Bool = true)
redirect
Class Method Detail
Encodes a string such that older stremio clients can access the urls ie: "foo-bar" === "foo%2Dbar"
Instance Method Detail
Anytime routes are added, we'll also add an optional redirect if any parameters need to be escaped for non-compliant stremio clients