RangeDirectives

org.apache.pekko.http.scaladsl.server.directives.RangeDirectives
See theRangeDirectives companion object

Attributes

Companion
object
Source
RangeDirectives.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Directives
object Directives
class HttpApp

Members list

Grouped members

Range directives

Answers GET requests with an Accept-Ranges: bytes header and converts HttpResponses coming back from its inner route into partial responses if the initial request contained a valid Range request header. The requested byte-ranges may be coalesced. This directive is transparent to non-GET requests Rejects requests with unsatisfiable ranges UnsatisfiableRangeRejection. Rejects requests with too many expected ranges.

Answers GET requests with an Accept-Ranges: bytes header and converts HttpResponses coming back from its inner route into partial responses if the initial request contained a valid Range request header. The requested byte-ranges may be coalesced. This directive is transparent to non-GET requests Rejects requests with unsatisfiable ranges UnsatisfiableRangeRejection. Rejects requests with too many expected ranges.

Note: if you want to combine this directive with conditional(...) you need to put it on the inside of the conditional(...) directive, i.e. conditional(...) must be on a higher level in your route structure in order to function correctly.

Attributes

See also
Source
RangeDirectives.scala