Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created July 22, 2020 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save recursivecodes/bf02da83bc55e5f15c038f5eac8a3599 to your computer and use it in GitHub Desktop.
Save recursivecodes/bf02da83bc55e5f15c038f5eac8a3599 to your computer and use it in GitHub Desktop.
invoke-fn.ts
(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