Skip to content

Commit b786260

Browse files
committed
update docs
1 parent 4c3cf7b commit b786260

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

docs/core_concepts/4_webhooks/index.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ securely!
103103

104104
## Webhook specific tokens
105105

106-
Webhook specific tokens allow sharing tokens publicly without fear since the token will only be able to trigger a specific script/flow and not impersonate you for any other operations.
106+
Webhook specific tokens allow sharing tokens publicly without fear since the token will only be able to trigger a specific script/flow and not impersonate you for any other operations.
107107

108108
It also avoids the hassle of having to create an anonymous user and check their permissions. If you can run the script yourself, then the webhook specific token will still inherit your own permissions.
109109

@@ -169,7 +169,22 @@ It is possible for jobs to take request headers as arguments. To do so, either s
169169

170170
or use the env variable: `INCLUDE_HEADERS` with the same format so that all requests to any job will include the headers.
171171

172-
## Raw payload
172+
## Non Object payload / body
173+
174+
If the payload is not an object, it will be wrapped in an object with the key `body` and the value will be the payload/body itself. e.g:
175+
176+
```
177+
[1,2,3] => {"body": [1,2,3]}
178+
```
179+
180+
and your script can process it as:
181+
182+
```python
183+
def main(body: List[int]):
184+
print(body)
185+
```
186+
187+
## Raw payload / body
173188

174189
Similarly to request headers, if the query args contain `raw=true`, then an additional argument will be added: `raw_string` which contains the entire json payload as a string (without any parsing). This is useful to verify the signature of the payload for example (discord require the endpoints to verify the signature for instance).
175190

0 commit comments

Comments
 (0)