Skip to content
Snippets Groups Projects
Unverified Commit 95b43855 authored by Alex Ellis's avatar Alex Ellis Committed by GitHub
Browse files

Docs - update with port of gateway

parent ddca4681
No related branches found
No related tags found
No related merge requests found
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
Asynchronous function calls can be queued up using the following route: Asynchronous function calls can be queued up using the following route:
``` ```
$ curl --data "message" http://gateway/async-function/{function_name} $ curl --data "message" http://gateway:8080/async-function/{function_name}
``` ```
Summary of modes for calling functions via API Gateway: Summary of modes for calling functions via API Gateway:
| Mode | Method | URL | Body | Headers | Query string | Mode | Method | URL | Body | Headers | Query string
| -------------|--------|------------------------------------------------|------|--------- |------------------- | | -------------|--------|------------------------------------------------|------|--------- |------------------- |
| Synchronous | POST | http://gateway/function/{function_name} | Yes | Yes | Yes | | Synchronous | POST | http://gateway:8080/function/{function_name} | Yes | Yes | Yes |
| Synchronous | GET | http://gateway/function/{function_name} | Yes | Yes | Yes | | Synchronous | GET | http://gateway:8080/function/{function_name} | Yes | Yes | Yes |
| Asynchronous | POST | http://gateway/async-function/{function_name} | Yes | Yes | Yes [#369](https://github.com/openfaas/faas/issues/369) | | Asynchronous | POST | http://gateway:8080/async-function/{function_name} | Yes | Yes | Yes [#369](https://github.com/openfaas/faas/issues/369) |
| Asynchronous | GET | Not supported | - | - | - | | Asynchronous | GET | Not supported | - | - | - |
This work was carried out under [PR #131](https://github.com/openfaas/faas/pull/131). This work was carried out under [PR #131](https://github.com/openfaas/faas/pull/131).
...@@ -61,15 +61,17 @@ $ kubectl -f apply ./faas.async.yml,nats.yml ...@@ -61,15 +61,17 @@ $ kubectl -f apply ./faas.async.yml,nats.yml
Functions do not need to be modified to work asynchronously, just use this alternate route: Functions do not need to be modified to work asynchronously, just use this alternate route:
``` ```
http://gateway/async-function/{function_name} http://gateway:8080/async-function/{function_name}
``` ```
If you want the function to call another function or a different endpoint when it is finished then pass the `X-Callback-Url` header. This is optional. If you want the function to call another function or a different endpoint when it is finished then pass the `X-Callback-Url` header. This is optional.
``` ```
$ curl http://gateway/async-function/{function_name} --data-binary @sample.json -H "X-Callback-Url: http://gateway/function/send2slack" $ curl http://gateway:8080/async-function/{function_name} --data-binary @sample.json -H "X-Callback-Url: http://gateway:8080/function/send2slack"
``` ```
You can also use the following site to setup a public endpoint for testing HTTP callbacks: [requestb.in](https://requestb.in)
## Extend function timeouts ## Extend function timeouts
Functions have three timeouts configurable by environmental variables expressed in seconds: Functions have three timeouts configurable by environmental variables expressed in seconds:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment