We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43f252b commit 79b54d8Copy full SHA for 79b54d8
README.md
@@ -1535,16 +1535,16 @@ def odds_handler(sport):
1535
home_odds, away_odds = 2.44, 3.29
1536
response.headers['Content-Type'] = 'application/json'
1537
response.headers['Cache-Control'] = 'no-cache'
1538
- return json.dumps([home_odds, away_odds])
+ return json.dumps([team, home_odds, away_odds])
1539
```
1540
1541
#### Test:
1542
```python
1543
# $ pip3 install requests
1544
>>> import requests
1545
->>> r = requests.post('http://localhost:8080/odds/soccer', data={'team': 'arsenal'})
+>>> r = requests.post('http://localhost:8080/odds/soccer', data={'team': 'arsenal f.c.'})
1546
>>> r.json()
1547
-[2.44, 3.29]
+['arsenal f.c.', 2.44, 3.29]
1548
1549
1550
0 commit comments