generated from AdobeDocs/dev-site-documentation-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9589e2
commit 6f05f59
Showing
4 changed files
with
1,603 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export function requestInterceptor(req, operation) { | ||
console.log('***!!! Operation:', operation); | ||
// // you get the operation model with raw operation info from the OAS definition | ||
const rawOperation = operation.operationDefinition; | ||
console.log('***!!! Request:', req, rawOperation); | ||
|
||
// // you can manipulate headers, e.g. inject header based on req body | ||
// req.headers['x-body-length'] = req.body?.length; | ||
|
||
// // you can also change the req URL | ||
// req.url = '/proxy' + req.url; | ||
|
||
return req; | ||
} |
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
Oops, something went wrong.