⌂Akka HTTP
10.0.0
  • Java Documentation
    • Akka HTTP
      • Introduction
      • Configuration
      • HTTP Model
      • Common Abstractions (Client- and Server-Side)
      • Implications of the streaming nature of Request/Response Entities
      • Low-Level Server-Side API
      • High-level Server-Side API
      • Server-Side WebSocket Support
      • Consuming HTTP-based Services (Client-Side)
      • Server-Side HTTPS Support
      • Migration Guides (Java)
  • Scala Documentation
    • Akka HTTP
      • Introduction
      • Configuration
      • HTTP Model
      • Common Abstractions (Client- and Server-Side)
      • Implications of the streaming nature of Request/Response Entities
      • Low-Level Server-Side API
      • High-level Server-Side API
      • Server-Side WebSocket Support
      • Consuming HTTP-based Services (Client-Side)
      • Server-Side HTTPS Support
      • Handling blocking operations in Akka HTTP
      • Migration Guides
  • Security announcements
Akka HTTP
⌂Akka HTTP
10.0.0
  • Java Documentation
    • Akka HTTP
      • Introduction
      • Configuration
      • HTTP Model
      • Common Abstractions (Client- and Server-Side)
      • Implications of the streaming nature of Request/Response Entities
      • Low-Level Server-Side API
      • High-level Server-Side API
      • Server-Side WebSocket Support
      • Consuming HTTP-based Services (Client-Side)
      • Server-Side HTTPS Support
      • Migration Guides (Java)
  • Scala Documentation
    • Akka HTTP
      • Introduction
      • Configuration
      • HTTP Model
      • Common Abstractions (Client- and Server-Side)
      • Implications of the streaming nature of Request/Response Entities
      • Low-Level Server-Side API
      • High-level Server-Side API
      • Server-Side WebSocket Support
      • Consuming HTTP-based Services (Client-Side)
      • Server-Side HTTPS Support
      • Handling blocking operations in Akka HTTP
      • Migration Guides
  • Security announcements
  • Akka HTTP
  • Scala Documentation
  • Akka HTTP
  • High-level Server-Side API
  • Directives
  • Predefined Directives (by trait)
  • CodingDirectives
  • requestEncodedWith

requestEncodedWith

Signature

def requestEncodedWith(encoding: HttpEncoding): Directive0

Description

Passes the request to the inner route if the request is encoded with the argument encoding. Otherwise, rejects the request with an UnacceptedRequestEncodingRejection(encoding).

This directive is the building block for decodeRequest to reject unsupported encodings.

Next: responseEncodingAccepted

On this page:
  • requestEncodedWith
    • Signature
    • Description