Packages

p

org.http4s.server

staticcontent

package staticcontent

Helpers for serving static content from http4s

Note that these tools are relatively primitive and a dedicated server should be used for serious static content serving.

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. staticcontent
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait CacheStrategy[F[_]] extends AnyRef

    Cache the body of a Response for future use

    Cache the body of a Response for future use

    A CacheStrategy acts like a after filter in that it can look at the Response and Uri of the Request and decide if the body for the response has already been cached, needs caching, or to let it pass through.

  2. class MemoryCache[F[_]] extends CacheStrategy[F]

    CacheStrategy that will cache all Response bodies in local memory

    CacheStrategy that will cache all Response bodies in local memory

    This is useful when serving a very limited amount of static content and want to avoid disk access.

  3. class NoopCacheStrategy[F[_]] extends CacheStrategy[F]

    Cache strategy that doesn't cache anything, ever.

Value Members

  1. def fileService[F[_]](config: Config[F])(implicit arg0: Effect[F]): HttpRoutes[F]

    Make a new org.http4s.HttpRoutes that serves static files.

  2. def resourceService[F[_]](config: Config[F])(implicit arg0: Effect[F], arg1: ContextShift[F]): HttpRoutes[F]

    Make a new org.http4s.HttpRoutes that serves static files, possibly from the classpath.

  3. def webjarService[F[_]](config: Config[F])(implicit arg0: Effect[F], arg1: ContextShift[F]): HttpRoutes[F]

    Make a new org.http4s.HttpRoutes that serves static files from webjars

  4. object FileService
  5. object MemoryCache
  6. object NoopCacheStrategy
  7. object PathNormalizer
  8. object ResourceService
  9. object WebjarService

    Constructs new services to serve assets from Webjars

Inherited from AnyRef

Inherited from Any

Ungrouped