The operator should be "+" (#732)

* The operator should be "+"

The operator should be "+", because in the example the HTTP method is "/add"

* typo fix: it should be "response" body
This commit is contained in:
Sky/敖小剑 2020-08-10 21:25:01 +08:00 committed by GitHub
parent 092bfc002e
commit 13cc7aed3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -81,14 +81,14 @@ app.post('/add', (req, res) => {
let args = req.body;
const [operandOne, operandTwo] = [Number(args['arg1']), Number(args['arg2'])];
let result = operandOne / operandTwo;
let result = operandOne + operandTwo;
res.send(result.toString());
});
app.listen(port, () => console.log(`Listening on port ${port}!`));
```
> The response from the remote endpoint will be returned in the request body.
> The response from the remote endpoint will be returned in the response body.
In case when your service listens on a more nested path (e.g. `/api/v1/add`), Dapr implements a full reverse proxy so you can append all the necessary path fragments to your request URL like this: