⌂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
  • Java Documentation
  • Akka HTTP
  • High-level Server-Side API
  • Directives
  • Predefined Directives (by trait)
  • BasicDirectives
  • mapSettings

mapSettings

Description

Transforms the RoutingSettings with a Function<RoutingSettings, RoutingSettings>.

See also withSettings or extractSettings-java.

Example

final Route route = mapSettings(settings ->
  settings.withFileGetConditional(false), () ->
  extractSettings(settings ->
    complete("RoutingSettings.fileGetConditional = " + settings.getFileGetConditional())
  )
);

// tests:
testRoute(route).run(HttpRequest.GET("/"))
  .assertEntity("RoutingSettings.fileGetConditional = false");

Next: mapUnmatchedPath

On this page:
  • mapSettings
    • Description
    • Example