Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Depetrol committed Oct 10, 2024
1 parent 6593008 commit 6ba838a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/Python/src/WebServer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ async def addone(request: Request):
return {"status": "success", "num": num}
```

`self` here refers to the `WebServer` reactor in which the handler is defined. The `self.app` is an instance of `FastAPI` application instance, defined as a state of the `WebServer` reactor. Import statements are in the `preamble` and not shown here for simplicity. This handler function will be triggered to generate a response to an HTTP `POST` request at the `/addone` endpoint.

And the reaction to the action is

```python
Expand Down

0 comments on commit 6ba838a

Please sign in to comment.