Skip to content

Commit 975d75d

Browse files
ivanayovalexellis
authored andcommitted
Document X-Call-Id
This adds information for X-Call-Id and how to use it with asynchronous functions Signed-off-by: Ivana Yovcheva (VMware) <[email protected]>
1 parent f2d4b64 commit 975d75d

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

docs/deployment/troubleshooting.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,33 @@ Any function can be invoked asynchronously by changing the route on the gateway
99
If you would like to receive a value from an asynchronous call you should pass a HTTP header with the URL to be used for the call-back.
1010

1111
```
12-
$ faas invoke figlet --Header "X-Callback-Url=https://request.bin/mybin"
12+
$ faas invoke figlet -H "X-Callback-Url: https://request.bin/mybin"
13+
```
14+
15+
It will pass back the X-Call-Id you had when you sent the initial request.
16+
17+
You can use `netcat` to check the Call Id during invocation:
18+
19+
```
20+
$ curl -d "Hello" http://127.0.0.1:8080/async-function/figlet "X-Callback-Url: http://<your-ip>:8888"
21+
```
22+
23+
```
24+
$ nc -l 8888
25+
HTTP/1.1 200 OK
26+
Content-Length: 174
27+
Content-Type: application/x-www-form-urlencoded
28+
Date: Tue, 04 Dec 2018 09:24:55 GMT
29+
X-Call-Id: eb8283f5-1679-48e0-afec-194544b054aa
30+
X-Duration-Seconds: 0.002885
31+
X-Start-Time: 1543915495384346700
32+
33+
_ _ _ _
34+
| | | | ___| | | ___
35+
| |_| |/ _ \ | |/ _ \
36+
| _ | __/ | | (_) |
37+
|_| |_|\___|_|_|\___/
38+
1339
```
1440

1541
Alternatively you can specify another asynchronous or synchronous function to run instead.

0 commit comments

Comments
 (0)