TapirStaticContentEndpoints

Static content endpoints, including files and resources.

class Object
trait Matchable
class Any
trait Tapir

Value members

Concrete methods

def fileGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(systemPath: String): ServerEndpoint[Any, F]

A server endpoint, which exposes a single file from local storage found at systemPath, using the given path.

A server endpoint, which exposes a single file from local storage found at systemPath, using the given path.

fileGetServerEndpoint("static" / "hello.html")("/home/app/static/data.html")
def filesGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(systemPath: String, options: FilesOptions[F]): ServerEndpoint[Any, F]

A server endpoint, which exposes files from local storage found at systemPath, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

A server endpoint, which exposes files from local storage found at systemPath, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

filesGetServerEndpoint("static" / "files")("/home/app/static")

A request to /static/files/css/styles.css will try to read the /home/app/static/css/styles.css file.

def filesHeadServerEndpoint[F[_]](prefix: EndpointInput[Unit])(systemPath: String, options: FilesOptions[F]): ServerEndpoint[Any, F]

A server endpoint, used to verify if sever supports range requests for file under particular path Additionally it verify file existence and returns its size

A server endpoint, used to verify if sever supports range requests for file under particular path Additionally it verify file existence and returns its size

def filesServerEndpoints[F[_]](prefix: EndpointInput[Unit])(systemPath: String, options: FilesOptions[F]): List[ServerEndpoint[Any, F]]

Create a pair of endpoints (head, get) for exposing files from local storage found at systemPath, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

Create a pair of endpoints (head, get) for exposing files from local storage found at systemPath, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

filesServerEndpoints("static" / "files")("/home/app/static")

A request to /static/files/css/styles.css will try to read the /home/app/static/css/styles.css file.

def resourceGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(classLoader: ClassLoader, resourcePath: String, options: ResourcesOptions[F]): ServerEndpoint[Any, F]

A server endpoint, which exposes a single resource available from the given classLoader at resourcePath, using the given path.

A server endpoint, which exposes a single resource available from the given classLoader at resourcePath, using the given path.

resourceGetServerEndpoint("static" / "hello.html")(classOf[App].getClassLoader, "app/data.html")
def resourcesGetServerEndpoint[F[_]](prefix: EndpointInput[Unit])(classLoader: ClassLoader, resourcePrefix: String, options: ResourcesOptions[F]): ServerEndpoint[Any, F]

A server endpoint, which exposes resources available from the given classLoader, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

A server endpoint, which exposes resources available from the given classLoader, using the given prefix. Typically, the prefix is a path, but it can also contain other inputs. For example:

resourcesGetServerEndpoint("static" / "files")(classOf[App].getClassLoader, "app")

A request to /static/files/css/styles.css will try to read the /app/css/styles.css resource.