โŒ‚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)
  • BasicDirectives
  • mapRouteResult

mapRouteResult

Signature

def mapRouteResult(f: RouteResult โ‡’ RouteResult): Directive0

Description

Changes the message the inner route sends to the responder.

The mapRouteResult directive is used as a building block for Custom Directives to transform the RouteResult coming back from the inner route.

See Result Transformation Directives for similar directives.

Example

@@snip BasicDirectivesExamplesSpec.scala { #0mapRouteResult }

Next: mapRouteResultFuture

On this page:
  • mapRouteResult
    • Signature
    • Description
    • Example