Skip to content

Add Segment HTTP endpoint example#120

Merged
D-K-P merged 2 commits intotriggerdotdev:mainfrom
hmacr:segment-http
Nov 28, 2023
Merged

Add Segment HTTP endpoint example#120
D-K-P merged 2 commits intotriggerdotdev:mainfrom
hmacr:segment-http

Conversation

@hmacr
Copy link
Copy Markdown
Contributor

@hmacr hmacr commented Nov 27, 2023

Closes #98

Test Steps

  1. Created a pipeline on Segment that listens to an HTTP request (source) and forwards the request data to a webhook (Destination).
  2. Created a trigger.dev job to send an HTTP request to Segment.
  3. segment-http-endpoint job in this PR listens to the webhook and logs the body.

Screen Recording

Screen.Recording.2023-11-28.at.12.05.06.AM.mp4

}

const body = await request.text();
const bodyDigest = crypto
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified to use the built-in verifyRequestSignature once sha1 support is added.

@D-K-P D-K-P merged commit edf1fa2 into triggerdotdev:main Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create an example Segment job which uses an HTTP endpoint / trigger

2 participants