Skip to content
Snippets Groups Projects
Commit 2727e713 authored by Ralf Klammer's avatar Ralf Klammer
Browse files

Add examples to README.MD

parent d38028f6
No related branches found
No related tags found
No related merge requests found
Pipeline #127806 failed
......@@ -51,6 +51,47 @@ project_app
project_code
```
## Examples
### Download CSV file
Look for following code in `project_app/app.py`:
```python
@app.route("/download_csv", methods=["GET"])
def download_csv():
```
You can simply access this route via browser: http://127.0.0.1:8083/download_csv?input_value=1000
### Get JSON Response
#### via GET
Look for following code in `project_app/app.py`:
```python
@app.route("/json_response", methods=["GET"])
def get_json_via_get():
```
You can simply access this via browser: http://127.0.0.1:8083/json_response
#### via POST
Look for following code in `project_app/app.py`:
```python
@app.route("/json_response", methods=["POST"])
def get_json_via_post():
```
You can NOT access this via browser, but you can access it as ajax request. Look for the following code in `project_app/static/js/main.js`:
```JavaScript
$('.get_json').click(get_json_via_post)
```
## Configuration
......
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