Skip to content

Commit 8fdf55f

Browse files
committed
Functions updates
1 parent b6f701b commit 8fdf55f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/_includes/content/functions/runtime.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Functions use Node.js 14.x.
1+
Beginning April 30, 2023, Functions is migrating from Node.js 14.x to Node.js 16.x. You're not required to take any further action.
2+
3+
<div class="premonition success"><div class="fa fa-check-square"></div><div class="content"><p class="header">Node.js 18.x: </p><p markdown=1>Starting June 30, 2023, you can [contact Segment](https://segment.com/help/contact/){:target="_blank"} to migrate to Node.js 18.x.</p></div></div>
24

35
Functions do not currently support importing dependencies, but you can [contact Segment Support](https://segment.com/help/contact/){:target="_blank"} to request that one be added.
46

src/connections/functions/source-functions.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ You can test your code directly from the editor in two ways: either by receiving
297297

298298
The advantage of testing your source function with webhooks is that all incoming data is real, so you can test behavior while closely mimicking the production conditions.
299299

300+
Note that Segment has updated the webhook URL to `api.segmentapis.com/functions`. To use webhooks with your function:
301+
- You must [generate a public API token](https://docs.segmentapis.com/tag/Getting-Started/#section/Get-an-API-token){:target="_blank"}.
302+
- For POST calls, you'll need to use this API token in the header.
303+
300304
### Testing source functions with a webhook
301305

302306
You can use webhooks to test the source function either by sending requests manually (using any HTTP client such as cURL or Insomnia) or by pasting the webhook into an external server that supports webhooks (such as Slack).
@@ -408,4 +412,3 @@ Segment alphabetizes payload fields that come in to **deployed** source function
408412
#### Does the source function allow `GET` requests?
409413

410414
`GET` requests are not supported with a source function. Source functions can only receive data through `POST` requests.
411-

0 commit comments

Comments
 (0)