set-basic-auth ( request username password -- request ) (original) (raw)
Vocabulary
http
Inputs
request | a request |
---|---|
username | a string |
password | a string |
Outputs
request | a request |
---|
Word description
Sets the Authorization header of request to perform HTTP Basic authentication with the given username and password.
Notes
This word always returns the same object that was input. This allows for a "pipeline" coding style, where several header parameters are set in a row.
Side effects
Modifies request
Definition
: set-basic-auth ( request username password -- request )
basic-auth "Authorization" set-header ;