spray
latest
  • Introduction
  • Documentation
  • Project Info
  • Blog
  • Contact
spray
  • Docs »
  • <no title>
  • Edit on GitHub

  • Introduction
    • What is spray?
      • Principles
      • Modules
      • Philosophy
    • Getting Started
    • spray for Web Development
      • This Site
    • Other Resources
  • Documentation
    • spray-caching
      • Dependencies
      • Installation
      • The Cache Interface
      • Example
      • Cache Implementations
        • SimpleLruCache
        • ExpiringLruCache
    • spray-can
      • Dependencies
      • Installation
      • Configuration
      • HTTP Server
        • Design Philosophy
        • Basic Architecture
        • Starting
        • Stopping
        • Message Protocol
          • Request-Response Cycle
          • Chunked Requests
          • Chunked Responses
          • Request Timeouts
          • Closed Notifications
          • Server Statistics
        • HTTP Headers
        • HTTP Pipelining
        • SSL Support
      • HTTP Client APIs
        • Connection-level API
          • Opening HTTP Connections
          • Request-Response Cycle
          • Closing Connections
          • Timeouts
        • Host-level API
          • Starting an HttpHostConnector
          • Using an HttpHostConnector
          • Retrying a Request
          • Connector Shutdown
        • Request-level API
        • Basic API Structure
        • Chunked Requests
        • Chunked Responses
        • HTTP Headers
        • SSL Support
        • Redirection Following
          • Which redirects are followed?
      • Common Behavior
        • Closing Connections
        • ACKed Sends
      • Examples
        • simple-http-client
        • simple-http-server
        • server-benchmark
    • spray-client
      • Dependencies
      • Installation
      • Usage
      • Example
        • simple-spray-client
    • spray-http
      • Dependencies
      • Installation
      • Overview
      • Content-Type Header
      • Custom Media-Types
    • spray-httpx
      • Dependencies
      • Installation
      • Marshalling
        • Default Marshallers
        • Implicit Resolution
        • Custom Marshallers
        • Deriving Marshallers
        • ToResponseMarshaller
      • Unmarshalling
        • Default Unmarshallers
        • Implicit Resolution
        • Custom Unmarshallers
        • Deriving Unmarshallers
          • Unmarshaller.delegate
          • Unmarshaller.forNonEmpty
        • More specific Unmarshallers
          • FromMessageUnmarshaller
          • FromRequestUnmarshaller
          • FromResponseUnmarshaller
      • (De)compression
        • Compression of Chunk Streams
      • Request Building
      • Response Transformation
        • Predefined Response Transformers
      • spray-json Support
      • lift-json Support
      • json4s Support
      • Twirl Support
    • spray-io
      • Dependencies
      • Installation
    • spray-routing
      • Dependencies
      • Installation
      • Configuration
      • Getting Started
        • SimpleRoutingApp
      • Key Concepts
        • Big Picture
          • The HttpService
          • The runRoute Wrapper
        • Routes
          • Constructing Routes
          • Composing Routes
          • The Routing Tree
        • Directives
          • What Directives do
          • The Responder Chain
          • Composing Directives
          • Type Safety
        • Rejections
          • Predefined Rejections
          • RejectionHandler
          • Rejection Cancellation
          • Empty Rejections
        • Exception Handling
        • Timeout Handling
      • Advanced Topics
        • Understanding the DSL Structure
          • Understanding Extractions
          • Performance Tuning
        • Case Class Extraction
          • Case Class Validation
        • Custom Directives
          • Configuration Labelling
          • Transforming Directives
            • map / hmap
            • flatMap / hflatMap
            • require / hrequire
            • recover / recoverPF
          • Directives from Scratch
        • Response Streaming
      • Predefined Directives (alphabetically)
      • Predefined Directives (by trait)
        • Directives filtering or extracting from the request
        • Directives creating or transforming the response
        • List of predefined directives by trait
          • AnyParamDirectives
            • anyParam
              • Signature
              • Description
            • anyParams
              • Signature
              • Description
              • Example
          • BasicDirectives
            • Directives to provide values to inner routes
            • Directives transforming the request
            • Directives transforming the response
            • Directives hooking into the responder chain
            • Directives changing the execution of the inner route
            • Directives alphabetically
              • extract
                • Signature
                • Description
                • Example
              • hextract
                • Signature
                • Description
                • Example
              • hprovide
                • Signature
                • Description
                • Example
              • mapHttpResponse
                • Signature
                • Description
                • Example
              • mapHttpResponseEntity
                • Signature
                • Description
                • Example
              • mapHttpResponseHeaders
                • Signature
                • Description
                • Example
              • mapHttpResponsePart
                • Signature
                • Description
                • Example
              • mapInnerRoute
                • Signature
                • Description
                • Example
              • mapRejections
                • Signature
                • Description
                • Example
              • mapRequest
                • Signature
                • Description
                • Example
              • mapRequestContext
                • Signature
                • Description
                • Example
              • mapRouteResponse
                • Signature
                • Description
                • Example
              • mapRouteResponsePF
                • Signature
                • Description
                • Example
              • noop
                • Signature
                • Description
                • Example
              • pass
              • provide
                • Signature
                • Description
                • Example
              • routeRouteResponse
                • Signature
                • Description
                • Example
          • CacheConditionDirectives
            • conditional
              • Signature
              • Description
          • CachingDirectives
            • alwaysCache
              • Signature
              • Description
              • Example
            • cache
              • Signature
              • Description
              • Example
            • cachingProhibited
              • Signature
              • Description
              • Example
            • Usage
          • ChunkingDirectives
            • autoChunk
              • Signature
              • Description
              • Example
            • autoChunkFileBytes
              • Signature
              • Description
              • Example
          • CookieDirectives
            • cookie
              • Signature
              • Description
              • Example
            • deleteCookie
              • Signature
              • Description
              • Example
            • optionalCookie
              • Signature
              • Description
              • Example
            • setCookie
              • Signature
              • Description
              • Example
          • DebuggingDirectives
            • logRequest
              • Signature
              • Description
              • Example
            • logRequestResponse
              • Signature
              • Description
              • Example
            • logResponse
              • Signature
              • Description
              • Example
          • EncodingDirectives
            • compressResponse
              • Signature
              • Description
              • Example
            • compressResponseIfRequested
              • Signature
              • Description
              • Example
            • decodeRequest
              • Signature
              • Description
              • Example
            • decompressRequest
              • Signature
              • Description
              • Example
            • encodeResponse
              • Signature
              • Description
              • Example
            • requestEncodedWith
              • Signature
              • Description
            • responseEncodingAccepted
              • Signature
              • Description
            • When to use which compression directive?
            • When to use which decompression directive?
            • Combining compression and decompression
          • ExecutionDirectives
            • detach
              • Signature
              • Description
              • Example
            • dynamic
              • Signature
              • Description
              • Example
            • dynamicIf
              • Signature
              • Description
              • Example
            • handleExceptions
              • Signature
              • Description
              • Example
            • handleRejections
              • Signature
              • Description
              • Example
          • FileAndResourceDirectives
            • getFromBrowseableDirectory
              • Signature
            • getFromBrowseableDirectories
              • Signature
              • Description
            • getFromDirectory
              • Signature
              • Description
            • getFromFile
              • Signature
              • Description
            • getFromResource
              • Signature
              • Description
            • getFromResourceDirectory
              • Signature
              • Description
            • listDirectoryContents
              • Signature
              • Description
            • respondWithLastModifiedHeader
              • Signature
          • FormFieldDirectives
            • formField
              • Signature
              • Description
            • formFields
              • Signature
              • Description
              • Unmarshalling
                • Details
              • Example
          • FuturesDirectives
            • onComplete
              • Signature
              • Description
              • Example
            • onSuccess
              • Signature
              • Description
              • Example
            • onFailure
              • Signature
              • Description
              • Example
          • HeaderDirectives
            • headerValue
              • Signature
              • Description
              • Example
            • headerValueByName
              • Signature
              • Description
              • Example
            • headerValueByType
              • Signature
              • Description
              • Example
            • headerValuePF
              • Signature
              • Description
              • Example
            • optionalHeaderValue
              • Signature
              • Description
            • optionalHeaderValueByName
              • Signature
              • Description
            • optionalHeaderValueByType
              • Signature
              • Description
              • Example
            • optionalHeaderValuePF
              • Signature
              • Description
          • HostDirectives
            • host
              • Signature
              • Description
              • Example
            • hostName
              • Signature
              • Description
              • Example
          • Marshalling Directives
            • entity
              • Signature
              • Description
              • Examples
            • produce
              • Signature
              • Description
              • Examples
            • handleWith
              • Signature
              • Description
              • Examples
            • Understanding Specific Marshalling Directives
          • MethodDirectives
            • delete
              • Signature
              • Description
              • Example
            • get
              • Signature
              • Description
              • Example
            • head
              • Signature
              • Description
              • Example
            • method
              • Signature
              • Description
              • Example
            • options
              • Signature
              • Description
              • Example
            • overrideMethodWithParameter
            • patch
              • Signature
              • Description
              • Example
            • post
              • Signature
              • Description
              • Example
            • put
              • Signature
              • Description
              • Example
          • MiscDirectives
            • cancelAllRejections
              • Signature
              • Description
              • Example
            • cancelRejection
              • Signature
              • Description
              • Example
            • clientIP
              • Signature
              • Description
              • Example
            • jsonpWithParameter
              • Signature
              • Description
              • Example
            • rejectEmptyResponse
              • Signature
              • Description
              • Example
            • requestEntityEmpty
              • Signature
              • Description
              • Example
            • requestEntityPresent
              • Signature
              • Description
              • Example
            • requestInstance
              • Signature
              • Description
              • Example
            • requestUri
              • Signature
              • Description
              • Example
            • rewriteUnmatchedPath
              • Signature
              • Description
              • Example
            • unmatchedPath
              • Signature
              • Description
              • Example
            • validate
              • Signature
              • Example
          • ParameterDirectives
            • parameter
              • Signature
              • Description
              • Example
            • parameterMap
              • Signature
              • Description
              • Example
            • parameterMultiMap
              • Signature
              • Description
              • Example
            • parameters
              • Signature
              • Description
              • Examples
                • Required parameter
                • Optional parameter
                • Optional parameter with default value
                • Parameter with required value
                • Deserialized parameter
            • parameterSeq
              • Signature
              • Description
              • Example
            • When to use which parameter directive?
          • PathDirectives
            • path
              • Signature
              • Description
              • Example
            • pathEnd
              • Signature
              • Description
              • Example
            • pathEndOrSingleSlash
              • Signature
              • Description
              • Example
            • pathPrefix
              • Signature
              • Description
              • Example
            • pathPrefixTest
              • Signature
              • Description
              • Example
            • pathSingleSlash
              • Signature
              • Description
              • Example
            • pathSuffix
              • Signature
              • Description
              • Example
            • pathSuffixTest
              • Signature
              • Description
              • Example
            • rawPathPrefix
              • Signature
              • Description
              • Example
            • rawPathPrefixTest
              • Signature
              • Description
              • Example
            • The PathMatcher DSL
              • Overview
              • Basic PathMatchers
              • Combinators
              • Modifiers
              • Examples
          • RangeDirectives
            • withRangeSupport
              • Signature
              • Description
              • Example
          • RespondWithDirectives
            • respondWithHeader
              • Signature
              • Description
              • Example
            • respondWithHeaders
              • Signature
              • Description
              • Example
            • respondWithMediaType
              • Signature
              • Description
              • Example
            • respondWithSingletonHeader
              • Signature
              • Description
              • Example
            • respondWithSingletonHeaders
              • Signature
              • Description
              • Example
            • respondWithStatus
              • Signature
              • Description
              • Example
          • RouteDirectives
            • complete
              • Signature
              • Description
              • Example
            • failWith
              • Signature
              • Description
              • Example
            • redirect
              • Signature
              • Description
              • Example
            • reject
              • Signature
              • Description
              • Example
          • SchemeDirectives
            • scheme
              • Signature
              • Description
              • Example
            • schemeName
              • Signature
              • Description
              • Example
          • SecurityDirectives
            • authenticate
              • Signature
              • Description
                • HTTP Basic Authentication
                  • Implementing a UserPassAuthenticator
                  • From configuration
                  • From LDAP
            • authorize
              • Signature
              • Description
              • Example
            • optionalAuthenticate
              • Signature
              • Description
            • Authentication vs. Authorization
      • Complete Examples
        • on-spray-can
        • on-jetty
        • simple-routing-app
      • Minimal Example
      • Longer Example
    • spray-servlet
      • Dependencies
      • Installation
      • Configuration
      • Basic Architecture
      • Starting and Stopping
      • Message Protocol
        • Request-Response Cycle
        • Chunked Responses
        • Request Timeouts
        • Send Confirmations
        • Closed Notifications
      • HTTP Headers
      • Accessing HttpServletRequest
      • Differences to spray-can
      • Packaging a WAR file
      • Example
        • simple-spray-servlet-server
    • spray-testkit
      • Dependencies
      • Installation
      • Usage
      • Sealing Routes
      • Examples
    • spray-util
      • Dependencies
      • Installation
      • Configuration
      • Pimps
      • LoggingContext
  • Project Info
    • Current Versions
      • 0.9.0
      • 1.0.1
      • 1.1.3 / 1.2.3 / 1.3.3
      • Shapeless Versions
      • Nightly Builds
    • Migration from M8
      • Big breaking changes
        • Replacement of HttpBody by HttpData
        • Authentication
        • Chunking support
        • PathMatcher infrastructure
        • (Un)marshalling
      • Comprehensive list of breaking changes
        • spray-cache
        • spray-can
        • spray-http
        • spray-routing
        • spray-httpx
        • spray-io
        • spray-testkit
        • spray-util
    • Maven Repository
      • Artifact Naming
    • Contributing
      • Building spray
      • Contributing documentation
      • git Branching Model
      • git Commit Messages
      • Issue Tracking
      • Contributor License Agreement (CLA)
      • Pull Requests
    • Changelog
      • Version 1.1.3 (2015-03-24)
      • Version 1.1.2 (2014-10-08)
      • Version 1.1.1 (2014-03-14)
      • Version 1.1.0 (2013-11-29)
      • Version 1.1-RC4 (2013-11-20)
      • Version 1.1-RC3 (2013-11-13)
      • Version 1.1-RC2 (2013-10-30)
      • Version 1.1-RC1 (2013-10-22)
      • Version 1.1-M8 (2013-06-10)
      • Version 1.1-M7 (2012-12-19)
      • Version 1.1-M6 (2012-11-30)
      • Version 1.1-M5 (2012-11-09)
      • Version 1.1-M4 (2012-10-19)
      • Version 1.0-M4 (2012-10-19)
      • Version 1.0-M3 (2012-10-12)
      • Version 1.0-M2 (2012-05-16)
      • Version 1.0-M1 (2012-04-05)
      • Version 0.9.0 (2012-03-07)
      • Version 0.9.0-RC4 (2012-02-27)
      • Version 0.9.0-RC3 (2012-02-22)
      • Version 0.9.0-RC2 (2012-02-17)
      • Version 0.9.0-RC1 (2012-02-03)
      • Version 0.8.0 (2011-11-16)
      • Version 0.7.0 (2011-07-27)
      • Version 0.5.0 (2011-03-31)
    • Credits
    • References
    • Sponsors
    • License
    • Community Projects
  • Blog
    • spray on the Raspberry Pi
      • Introduction
      • JVMs on the Raspberry Pi
      • spray-can on the Raspberry Pi
        • Modifications on the spray-template-project
        • Running the modified project on the RPI
      • A little benchmark
      • Conclusion
    • spray 1.0-M8 / 1.1-M8 / 1.2-M8 released
      • Update 2013-06-11
    • Benchmarking spray
      • Analysis
      • Take-Aways
      • Benchmarking Wish-List
    • The Magnet Pattern
      • The Problem
      • Method Overloading Reloaded
        • Show me the Code
        • How does it work?
        • Implementation Notes
      • Benefits
        • No Erasure-induced Collisions
        • Full Function-Lifting
        • Package Object Support
        • DRYness for many similar Overloads
        • Removal of implicit Parameters
      • Drawbacks
        • Verbosity
        • API “Obfuscation”
        • No named Parameters
        • Limited by-name Parameters
        • Param List required
        • No default Parameters
        • No Type Inference on Arguments
      • Conclusion
    • Welcome to the spray Blog
  • Contact
    • Mailing List
    • Twitter
    • Email
    • Commercial Support
Next

© Copyright 2011-2015 spray.io.. Revision 76ab89c2.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
stable
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.