play.api

http

package http

Contains standard HTTP constants. For example:

val text = ContentTypes.TEXT
val ok = Status.OK
val accept = HeaderNames.ACCEPT
Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. http
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class ActionCompositionConfiguration(controllerAnnotationsFirst: Boolean = false) extends Product with Serializable

    Configuration for action composition.

    Configuration for action composition.

    controllerAnnotationsFirst

    If annotations put on controllers should be executed before the ones put on actions.

  2. case class ContentTypeOf[-A](mimeType: Option[String]) extends Product with Serializable

    Defines the default content type for type A.

    Defines the default content type for type A.

    A

    the content type

    Annotations
    @implicitNotFound( ... )
  3. trait ContentTypes extends AnyRef

    Defines common HTTP Content-Type header values, according to the current available Codec.

  4. case class CookiesConfiguration(strict: Boolean = true) extends Product with Serializable

    The cookies configuration

    The cookies configuration

    strict

    Whether strict cookie parsing should be used. If true, will cause the entire cookie header to be discarded if a single cookie is found to be invalid.

  5. trait DefaultContentTypeOfs extends AnyRef

    Contains typeclasses for ContentTypeOf.

  6. class DefaultHttpErrorHandler extends HttpErrorHandler

    The default HTTP error handler.

    The default HTTP error handler.

    This class is intended to be extended, allowing users to reuse some of the functionality provided here.

    Annotations
    @Singleton()
  7. class DefaultHttpRequestHandler extends HttpRequestHandler

    A default implementation of the HttpRequestHandler.

    A default implementation of the HttpRequestHandler.

    This can be conveniently overridden to plug in global interception or custom routing logic into Play's existing request handling infrastructure.

    Technically, this is not the default request handler that Play uses, rather, the GlobalSettingsHttpRequestHandler is the default one, in order to ensure that existing legacy implementations of global request interception still work. In future, this will become the default request handler.

    The default implementations of method interception methods on play.api.GlobalSettings match the implementations of this, so when not providing any custom logic, whether this is used or the global settings http request handler is used is irrelevant.

  8. trait DefaultWriteables extends LowPriorityWriteables

    Default Writeable.

  9. case class FlashConfiguration(cookieName: String = "PLAY_FLASH", secure: Boolean = false, httpOnly: Boolean = true) extends Product with Serializable

    The flash configuration

    The flash configuration

    cookieName

    The name of the cookie used to store the session

    secure

    Whether the flash cookie should set the secure flag or not

    httpOnly

    Whether the HTTP only attribute of the cookie should be set

  10. class GlobalSettingsHttpRequestHandler extends HttpRequestHandler

    An HttpRequestHandler that delegates to play.api.GlobalSettings.

    An HttpRequestHandler that delegates to play.api.GlobalSettings.

    This is the default request handler used by Play, in order to support legacy global settings request interception.

    Custom handlers need not extend this.

  11. trait HeaderNames extends AnyRef

    Defines all standard HTTP headers.

  12. case class HttpConfiguration(context: String = "/", parser: ParserConfiguration = ParserConfiguration(), actionComposition: ActionCompositionConfiguration = ActionCompositionConfiguration(), cookies: CookiesConfiguration = CookiesConfiguration(), session: SessionConfiguration = SessionConfiguration(), flash: FlashConfiguration = FlashConfiguration()) extends Product with Serializable

    HTTP related configuration of a Play application

    HTTP related configuration of a Play application

    context

    The HTTP context

    parser

    The parser configuration

    session

    The session configuration

    flash

    The flash configuration

  13. trait HttpErrorHandler extends AnyRef

    Component for handling HTTP errors in Play.

    Component for handling HTTP errors in Play.

    Since

    2.4.0

  14. trait HttpFilters extends AnyRef

    Provides filters to the play.http.HttpRequestHandler.

  15. trait HttpProtocol extends AnyRef

    Defines HTTP protocol constants

  16. trait HttpRequestHandler extends AnyRef

    Primary entry point for all HTTP requests on Play applications.

  17. trait HttpVerbs extends AnyRef

    Standard HTTP Verbs

  18. class JavaCompatibleHttpRequestHandler extends DefaultHttpRequestHandler

    A Java compatible HTTP request handler.

    A Java compatible HTTP request handler.

    If a router routes to Java actions, it will return instances of play.core.j.JavaHandler. This takes an instance of play.core.j.JavaHandlerComponents to supply the necessary infrastructure to invoke a Java action, and returns a new play.api.mvc.Handler that the core of Play knows how to handle.

    If your application routes to Java actions, then you must use this request handler as the base class as is or as the base class for your custom HttpRequestHandler.

  19. class JavaHttpFiltersAdapter extends HttpFilters

    Adapter from the Java HttpFliters to the Scala HttpFilters interface.

  20. trait LowPriorityWriteables extends AnyRef

    Default Writeable with lowwe priority.

  21. class MediaRange extends MediaType

    A media range as defined by RFC 2616 14.1

  22. case class MediaType(mediaType: String, mediaSubType: String, parameters: Seq[(String, Option[String])]) extends Product with Serializable

    A media type as defined by RFC 2616 3.7.

    A media type as defined by RFC 2616 3.7.

    mediaType

    The media type

    mediaSubType

    The media sub type

    parameters

    The parameters

  23. trait MimeTypes extends AnyRef

    Common HTTP MIME types

  24. class NoHttpFilters extends HttpFilters

    A filters provider that provides no filters.

  25. case class ParserConfiguration(maxMemoryBuffer: Int = 102400, maxDiskBuffer: Long = 10485760) extends Product with Serializable

    Configuration for body parsers.

    Configuration for body parsers.

    maxMemoryBuffer

    The maximum size that a request body that should be buffered in memory.

    maxDiskBuffer

    The maximum size that a request body should be buffered on disk.

  26. final class Port extends AnyVal

    A port.

    A port. This class is defined so that ports can be passed around implicitly.

  27. case class SessionConfiguration(cookieName: String = "PLAY_SESSION", secure: Boolean = false, maxAge: Option[FiniteDuration] = None, httpOnly: Boolean = true, domain: Option[String] = None) extends Product with Serializable

    The session configuration

    The session configuration

    cookieName

    The name of the cookie used to store the session

    secure

    Whether the session cookie should set the secure flag or not

    maxAge

    The max age of the session, none, use "session" sessions

    httpOnly

    Whether the HTTP only attribute of the cookie should be set

    domain

    The domain to set for the session cookie, if defined

  28. trait Status extends AnyRef

    Defines all standard HTTP status codes.

  29. class Writeable[-A] extends AnyRef

    Transform a value of type A to a Byte Array.

    Transform a value of type A to a Byte Array.

    A

    the content type

    Annotations
    @implicitNotFound( ... )

Value Members

  1. object ContentTypeOf extends DefaultContentTypeOfs with Serializable

    Default Content-Type typeclasses.

  2. object ContentTypes extends ContentTypes

    Defines common HTTP Content-Type header values, according to the current available Codec.

  3. object DefaultHttpErrorHandler extends DefaultHttpErrorHandler

    A default HTTP error handler that can be used when there's no application available

  4. object HeaderNames extends HeaderNames

    Defines all standard HTTP headers.

  5. object HttpConfiguration extends Serializable

  6. object HttpErrorHandler

  7. object HttpErrorHandlerExceptions

    Extracted so the Java default error handler can reuse this functionality

  8. object HttpFilters

  9. object HttpProtocol extends HttpProtocol

    Defines HTTP protocol constants

  10. object HttpRequestHandler

  11. object HttpVerbs extends HttpVerbs

    Standard HTTP Verbs

  12. object LazyHttpErrorHandler extends HttpErrorHandler

    A lazy HTTP error handler, that looks up the error handler from the current application

  13. object MediaRange extends Serializable

  14. object MediaType extends Serializable

  15. object MimeTypes extends MimeTypes

    Common HTTP MIME types

  16. object NoHttpFilters extends NoHttpFilters

  17. object NotImplementedHttpRequestHandler extends HttpRequestHandler

    Implementation of a [HttpRequestHandler] that always returns NotImplemented results

  18. object Status extends Status

    Defines all standard HTTP Status.

  19. object Writeable extends DefaultWriteables

    Helper utilities for Writeable.

  20. val dateFormat: DateTimeFormatter

    HTTP date formatter, compliant to RFC 1123

Inherited from AnyRef

Inherited from Any

Ungrouped