Created
July 22, 2020 20:22
-
-
Save recursivecodes/bf02da83bc55e5f15c038f5eac8a3599 to your computer and use it in GitHub Desktop.
invoke-fn.ts
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
(async () => { | |
const request: fn.requests.InvokeFunctionRequest = { | |
functionId: functionId, | |
invokeFunctionBody: JSON.stringify({ | |
name: "Todd" | |
}) | |
}; | |
const response: fn.responses.InvokeFunctionResponse = await fnClient.invokeFunction(request); | |
console.log( | |
JSON.parse( | |
await helper.getStringFromResponseBody(response.value) | |
) | |
) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment