Skip to content

Commit ec9fdf6

Browse files
committed
Added more docs details about the callback format
1 parent 799f8e1 commit ec9fdf6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/wait-for-http-callback.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Pause runs until an HTTP callback is made to the provided URL."
55

66
import UpgradeToV4Note from "/snippets/upgrade-to-v4-note.mdx";
77

8-
The `wait.forHttpCallback()` function gives you a callback URL, and then pauses the run until that callback is hit. This is most commonly used with 3rd party APIs that take a long time and that accept a callback (or webhook) URL.
8+
The `wait.forHttpCallback()` function gives you a callback URL, and then pauses the run until that callback is hit with a POST request. This is most commonly used with 3rd party APIs that take a long time and that accept a callback (or webhook) URL.
99

1010
When the callback URL is requested the run will continue where it left off with the body of the request as the output available for you to use.
1111

@@ -136,3 +136,9 @@ The `forHttpCallback` function returns a result object with the following proper
136136
### unwrap() returns
137137

138138
If you use the `unwrap()` method, it will just return the output of the token. If an error occurs it will throw an error.
139+
140+
## The format of the callback request
141+
142+
If you want to offload work to one of your own services you will need to do the callback request yourself.
143+
144+
The `wait.forHttpCallback()` function gives you a unique one-time use URL. You should do a `POST` request to this URL with a text body that is JSON parseable.

0 commit comments

Comments
 (0)