requestEncodedWith • Akka HTTP (original) (raw)
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.
Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.