Skip to content

Commit

Permalink
Update webhooks.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoScheufler committed Oct 18, 2024
1 parent 789ebe9 commit c94cbba
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pages/docs/platform/webhooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Transforms are defined as simple JavaScript functions that accept three argument
The raw JSON payload from the POST request body
</Property>
<Property name="headers" type="object" attribute>
A map of HTTP headers sent along with the request as key-value pairs.
A map of HTTP headers sent along with the request as key-value pairs. Header names are standardized by making the first character and any characters following a hyphen uppercase and the rest lowercase. For more details, [check out](https://pkg.go.dev/net/http#CanonicalHeaderKey) the underlying implementation reference.
</Property>
<Property name="queryParams" type="object" attribute>
A map of parsed query string parameters sent to the webhook URL. Values are all arrays to support multiple params for a single key.
Expand All @@ -112,6 +112,12 @@ function transform(evt, headers = {}, queryParams = {}) {

### Example transforms

<Callout variant="info">
💡 Header names are standardized by making the first character and any characters following a hyphen uppercase and the rest lowercase. For more details, [check out](https://pkg.go.dev/net/http#CanonicalHeaderKey) the underlying implementation reference.

Remember to check your transforms for header usage and make sure to use the correct case.
</Callout>

<details>
<summary>**Github** - Using headers</summary>

Expand Down Expand Up @@ -237,4 +243,4 @@ inngest.createFunction(

<Callout>
💡 **Tip**: To test functions locally, copy an event from a webhook from the Inngest dashboard and use it with the Inngest dev server's `Send test` button.
</Callout>
</Callout>

0 comments on commit c94cbba

Please sign in to comment.