~callum/http-string-store

798e1cb93794c4f4b615ef827b1fd9d14f5f6064 — Callum Brown 3 years ago 6dc96ed
Fix README formatting
1 files changed, 14 insertions(+), 6 deletions(-)

M README.md
M README.md => README.md +14 -6
@@ 6,20 6,28 @@ and retrieving UTF-8 strings.

## API Documentation

The Content-Type header of requests and responses must be
`text/plain; charset=UTF-8`.


```
GET /new
```
Returns the ID of a new string store in the response body.
The Content-Type header of the response will be "text/plain; charset=UTF-8".


```
POST /s/<id>
```
Set the string with the given ID to the string in the request body.
If the given ID is not already in use the server will return a "404 Not Found error".
The Content-Type header of the request must be "text/plain; charset=UTF-8";
if it is not the server will return a "415 Unsupported Media Type" error.
The Server may reject strings it deems too long by returning a "413 Payload Too Large" error.
If the given ID is not already in use the server will return a `404 Not Found` error.
The Server may reject strings it deems too long by returning a `413 Payload Too Large` error.


```
GET /s/<id>
```
Returns the string with the given ID in the response body.
The Content-Type header of the response will be "text/plain; charset=UTF-8".


## Server Setup