Created
January 20, 2025 08:34
-
-
Save ankur0101/83a15a934c303ea631f7105043d9526b to your computer and use it in GitHub Desktop.
SAP CAP - Calling function internally with headers
This file contains hidden or 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
| const oFuncResponse = await myService.myFunc1({ | |
| param1 : 'value1', | |
| param2 : 'value2' | |
| }); | |
| //If it is required to pass any custom headers, then use .send method with event paraeter as below: | |
| const oFuncResponse = await myService.send({ | |
| "event": 'myFunc1', | |
| "data": { | |
| param1 : 'value1', | |
| param2 : 'value2' | |
| }, | |
| "headers": { | |
| 'x-header-foo': 'bar' | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment