Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change format of delay for invocations #391

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/concepts/invocations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ Invocations get a unique identifier. This identifier is used to track the progre
---

```bash
curl localhost:8080/GreeterService/greet/send?delaySec=10 \
curl localhost:8080/GreeterService/greet/send?delay=10s \
-H 'content-type: application/json' \
-d '"Hi"'

curl localhost:8080/GreetCounter/Mary/greet/send?delaySec=10 \
curl localhost:8080/GreetCounter/Mary/greet/send?delay=10s \
-H 'content-type: application/json' \
-d '"Hi"'
```
Expand Down
6 changes: 3 additions & 3 deletions docs/invoke/http.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ You can use this identifier [to cancel](/operate/invocation#cancelling-invocatio

## Sending a delayed message over HTTP

You can **delay the message** by adding a delay request parameter in ISO8601 notation or in seconds:
You can **delay the message** by adding a delay request parameter in ISO8601 notation or using [humantime format](https://docs.rs/humantime/latest/humantime/):

<CH.Code>

```shell seconds
```shell humantime
# focus[40:56]
curl localhost:8080/MyService/myHandler/send?delaySec=10 \
curl localhost:8080/MyService/myHandler/send?delay=10s \
-H 'content-type: application/json' \
-d '{"name": "Mary", "age": 25}'
```
Expand Down
Loading