diff --git a/README.md b/README.md index 164f168..7746a2b 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,18 @@ To connect to the WebSocket for receiving subtitles and messages, simply use the websocat ws://localhost:8000/ws ` -To push new subtitles onto the server, use the `/subtitles` endpoint, for example like this: +To push new subtitles onto the server, use the `/subtitles` endpoints. There are currently two different ones, and each produces different response type. Here are some examples: + +- The first is `/subtitles/update_current`, which serves the purpose of updating the current sentence as it comes. Here is an example: ` -curl -X POST http://localhost:8000/subtitles -H "Content-Type: text/plain" -d 'I love pushing subtitles to servers!' +curl -X POST http://localhost:8000/subtitles/update_current -H "Content-Type: text/plain" -d 'I love pushing ' +` + +- The second is `/subtitles/submit_sentence`, which is used to submit the next finished sentence. Here is an example: + +` +curl -X POST http://localhost:8000/subtitles/submit_sentence -H "Content-Type: text/plain" -d 'I love pushing sentences to servers!' ` To control the server using commands, use the `/control` endpoint, for example like this: