Package

play.api

http

Permalink

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
Visibility
  1. Public
  2. All

Type Members

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

    Permalink

    Configuration for action composition.

    Configuration for action composition.

    controllerAnnotationsFirst

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

    executeActionCreatorActionFirst

    If the action returned by the action creator should be executed before the action composition ones.

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

    Permalink

    Defines the default content type for type A.

    Defines the default content type for type A.

    A

    the content type

    mimeType

    the default content type for A, if any

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

    Permalink

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

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

    Permalink

    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

    Permalink

    Contains typeclasses for ContentTypeOf.

  6. class DefaultHttpErrorHandler extends HttpErrorHandler

    Permalink

    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 DefaultHttpFilters extends HttpFilters

    Permalink

    A default implementation of HttpFilters that accepts filters as a varargs constructor and exposes them as a filters sequence.

    A default implementation of HttpFilters that accepts filters as a varargs constructor and exposes them as a filters sequence. For example:

    class Filters @Inject()(csrfFilter: CSRFFilter, corsFilter: CORSFilter)
      extends DefaultHttpFilters(csrfFilter, corsFilter)
  8. class DefaultHttpRequestHandler extends HttpRequestHandler

    Permalink

    A base implementation of the HttpRequestHandler that handles Scala actions.

    A base implementation of the HttpRequestHandler that handles Scala actions. If you use Java actions in your application, you should override JavaCompatibleHttpRequestHandler; otherwise you can override this for your custom handler.

    Technically, this is not the default request handler that Play uses, rather, the JavaCompatibleHttpRequestHandler is the default one, in order to provide support for Java actions.

    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.

  9. trait DefaultWriteables extends LowPriorityWriteables

    Permalink

    Default Writeable.

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

    Permalink

    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

  11. trait HeaderNames extends AnyRef

    Permalink

    Defines all standard HTTP headers.

  12. sealed trait HttpChunk extends AnyRef

    Permalink

    An HTTP chunk.

    An HTTP chunk.

    May either be a HttpChunk.Chunk containing data, or a HttpChunk.LastChunk, signifying the last chunk in a stream, optionally with trailing headers.

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

    Permalink

    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

  14. sealed trait HttpEntity extends AnyRef

    Permalink

    An HTTP entity.

    An HTTP entity.

    HTTP entities come in three flavors, HttpEntity.Strict, HttpEntity.Streamed and HttpEntity.Chunked.

  15. trait HttpErrorHandler extends AnyRef

    Permalink

    Component for handling HTTP errors in Play.

    Component for handling HTTP errors in Play.

    Since

    2.4.0

  16. trait HttpFilters extends AnyRef

    Permalink

    Provides filters to the play.api.http.HttpRequestHandler.

  17. trait HttpProtocol extends AnyRef

    Permalink

    Defines HTTP protocol constants

  18. trait HttpRequestHandler extends AnyRef

    Permalink

    Primary entry point for all HTTP requests on Play applications.

  19. trait HttpVerbs extends AnyRef

    Permalink

    Standard HTTP Verbs

  20. class JavaCompatibleHttpRequestHandler extends DefaultHttpRequestHandler

    Permalink

    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.

  21. class JavaHttpFiltersAdapter extends HttpFilters

    Permalink

    Adapter from the Java HttpFilters to the Scala HttpFilters interface.

  22. class JavaHttpFiltersDelegate extends http.DefaultHttpFilters

    Permalink
  23. trait LowPriorityWriteables extends AnyRef

    Permalink

    Default Writeable with lowwe priority.

  24. class MediaRange extends MediaType

    Permalink

    A media range as defined by RFC 2616 14.1

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

    Permalink

    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

  26. trait MimeTypes extends AnyRef

    Permalink

    Common HTTP MIME types

  27. class NoHttpFilters extends HttpFilters

    Permalink

    A filters provider that provides no filters.

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

    Permalink

    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.

  29. final class Port extends AnyVal

    Permalink

    A port.

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

  30. 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

    Permalink

    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

  31. trait Status extends AnyRef

    Permalink

    Defines all standard HTTP status codes.

  32. class Writeable[-A] extends AnyRef

    Permalink

    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( ... )
  33. class GlobalSettingsHttpRequestHandler extends HttpRequestHandler

    Permalink

    An HttpRequestHandler that delegates to play.api.GlobalSettings.

    An HttpRequestHandler that delegates to play.api.GlobalSettings.

    This handler should be used in order to support legacy global settings request interception.

    Custom handlers need not extend this.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) GlobalSettings is deprecated. Use DefaultHttpRequestHandler or JavaCompatibleHttpRequestHandler.

Value Members

  1. object ActionCreator

    Permalink
  2. object ContentTypeOf extends DefaultContentTypeOfs with Serializable

    Permalink

    Default Content-Type typeclasses.

  3. object ContentTypes extends ContentTypes

    Permalink

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

  4. object DefaultHttpErrorHandler extends DefaultHttpErrorHandler

    Permalink

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

  5. object HeaderNames extends HeaderNames

    Permalink

    Defines all standard HTTP headers.

  6. object HttpChunk

    Permalink
  7. object HttpConfiguration extends Serializable

    Permalink
  8. object HttpEntity

    Permalink
  9. object HttpErrorHandler

    Permalink
  10. object HttpErrorHandlerExceptions

    Permalink

    Extracted so the Java default error handler can reuse this functionality

  11. object HttpFilters

    Permalink
  12. object HttpProtocol extends HttpProtocol

    Permalink

    Defines HTTP protocol constants

  13. object HttpRequestHandler

    Permalink
  14. object HttpVerbs extends HttpVerbs

    Permalink

    Standard HTTP Verbs

  15. object LazyHttpErrorHandler extends HttpErrorHandler

    Permalink

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

  16. object MediaRange extends Serializable

    Permalink
  17. object MediaType extends Serializable

    Permalink
  18. object MimeTypes extends MimeTypes

    Permalink

    Common HTTP MIME types

  19. object NoHttpFilters extends NoHttpFilters

    Permalink
  20. object NotImplementedHttpRequestHandler extends HttpRequestHandler

    Permalink

    Implementation of a [HttpRequestHandler] that always returns NotImplemented results

  21. object Status extends Status

    Permalink

    Defines all standard HTTP Status.

  22. object Writeable extends DefaultWriteables

    Permalink

    Helper utilities for Writeable.

  23. val dateFormat: DateTimeFormatter

    Permalink

    HTTP date formatter, compliant to RFC 1123

  24. package websocket

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped