docs: Fix HTTP methods for /users endpoint.

Correct the `PUT` to `POST` in the
`/docs/tutorial/life-of-a-request.md` to match it with the actual code
in `zproject/urls.py` route: '/users'. (The HTTP method changed at
some point).

Tested by tabbott using:

curl -v -X HEAD https://chat.zulip.org/api/v1/users
This commit is contained in:
ecxtacy 2023-10-03 21:54:32 +05:30 committed by Tim Abbott
parent 6e3d6f531f
commit 61b9cff89b
1 changed files with 2 additions and 2 deletions

View File

@ -132,14 +132,14 @@ The OPTIONS method will yield the allowed methods.
This request:
`OPTIONS https://chat.zulip.org/api/v1/users`
yields a response with this HTTP header:
`Allow: PUT, GET`
`Allow: GET, HEAD, POST`
We can see this reflected in [zproject/urls.py](https://github.com/zulip/zulip/blob/main/zproject/urls.py):
```python
rest_path('users',
GET=get_members_backend,
PUT=create_user_backend),
POST=create_user_backend),
```
In this way, the API is partially self-documenting.