File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,33 @@ Any function can be invoked asynchronously by changing the route on the gateway
9
9
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.
10
10
11
11
```
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
+
13
39
```
14
40
15
41
Alternatively you can specify another asynchronous or synchronous function to run instead.
You can’t perform that action at this time.
0 commit comments