Skip to content

Commit 203f0a5

Browse files
committed
add failing curl examples
1 parent e33c032 commit 203f0a5

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,31 @@ curl -X 'POST' \
5252
}' | jq
5353
```
5454

55+
### Failing request example
56+
57+
This request uses an invalid `activity` value and should return `422 Unprocessable Entity`:
58+
59+
```shell
60+
curl -X 'POST' \
61+
'http://0.0.0.0:8080/strava/v1/routes/' \
62+
-H 'accept: application/json' \
63+
-H 'Content-Type: application/json' \
64+
-d '{
65+
"name": "broken route",
66+
"route": {"type": "LineString", "coordinates": [[0.0, 0.0], [1.0, 1.0]]},
67+
"activity": "SWIMMING",
68+
"description": "this should fail"
69+
}' | jq
70+
```
71+
72+
This request uses an invalid `bbox` value and should also return `422 Unprocessable Entity`:
73+
74+
```shell
75+
curl -X 'GET' \
76+
'http://0.0.0.0:8080/strava/v1/routes/?bbox=1.0,2.0,3.0' \
77+
-H 'accept: application/json' | jq
78+
```
79+
5580
### Listing routes
5681

5782
Now we can list the routes we've created:

0 commit comments

Comments
 (0)