CS-Coursework/documentation/get_test.md

40 lines
535 B
Markdown
Raw Permalink Normal View History

# Test API Endpoint
## GET `/api/test`
Returns 100 random words to be used to give a typing test. Retrieved from `wordlist.txt`
## Responses
- `200 OK`: Successfully retrieves the 100 words.
- `404 Not Found`: Indicates that the wordlist was not found.
## Example Request
```bash
curl -X GET "https://url/api/test"
```
## Example Response
```json
[
"separate",
"stand",
"think",
"island",
"have",
"air",
"heard",
"notice",
"yellow",
"smell",
"heart",
"island",
"chief",
"view",
"top",
...
]
```