bynk.test.extra_headers_authorization
Error A system case sends Authorization as an extra request header to a route that declares no headers: parameter; the case's by <Actor> owns the credential the driver sends.
A case sends a credential only through its by clause: the driver builds the Authorization header (or the signature headers) from the actor it acts as. Sending an Authorization header as an extra request header, in RequestHeaders.of, would give the request two competing credentials, so it is refused. Choose the actor with by, and keep RequestHeaders for other headers.
Example
let r <- api.GET("/health", RequestHeaders.of(["Authorization: Bearer x"])) by Visitor // ✗let r <- api.GET("/health", RequestHeaders.of(["X-Trace: 1"])) by Visitor // ✓In the Book
See also
- The grammar rule it governs:
case. - Every code in its category, Tests, on the diagnostic index.
bynk explain bynk.test.extra_headers_authorizationshows the same from the installed toolchain, without a network.