Skip to content

Commit

Permalink
update doc (easegress-io#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
suchen-sci committed Jul 19, 2022
1 parent 95c47e7 commit 4efa8a8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doc/reference/wasmhost.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@ And then create the pipeline `wasm-pipeline` which includes a `WasmHost` filter:
```bash
$ echo '
name: wasm-pipeline
kind: HTTPPipeline
kind: Pipeline
flow:
- filter: wasm
- filter: proxy
jumpIf: { fallback: END }
filters:
- name: wasm
Expand All @@ -100,17 +99,20 @@ filters:
timeout: 100ms
- name: proxy
kind: Proxy
mainPool:
servers:
pools:
- servers:
- url: http:https://127.0.0.1:9095
loadBalance:
policy: roundRobin' | egctl object create
```

Note we are using the path of the Wasm file as the value of `code` in the spec of `WasmHost`, but the value of `code` can also be a URL (HTTP/HTTPS) or the base64 encoded Wasm code.

Then, we need to set up the backend service by following [the steps in README.md](../README.md#test).
Then, we need to set up the backend service by following command.

```bash
go run easegress/example/backend-service/echo/echo.go
```
## Test

Now, let's send some requests to the HTTP server, we can see request header and body are set as desired.
Expand Down

0 comments on commit 4efa8a8

Please sign in to comment.