-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(HyperRequest): Add
forwardHeaders
shortcut method
`forwardHeaders` will add an array of header names to the HyperRequest if they exist in the headers struct. By default, the headers struct is the headers from the current CFML request (`getHTTPRequestData( false ).headers`). Hyper Clients can be configured to automatically forward headers by registering a request callback: ``` map( "MyAPIClient" ) .to( "hyper.models.HyperBuilder" ) .asSingleton() .initWith( baseUrl = "https://my-api.example.com", requestCallbacks = [ function( req ) { req.forwardHeaders( [ "X-Forwarded-For" ] ); } ] ); ``` Closes #28
- Loading branch information
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters