[关闭]
@fuyb1986 2016-07-21T06:41:21.000000Z 字数 408 阅读 505

检查房间名是否存在

面对面


Method and URL Structure

Method Resource URL
POST /room/validator/name

Request Parameters

Name Description Required Default
name 房间名 YES

Request

  1. {
  2. "name":"房间名"
  3. }

cURL example

  1. curl -X POST -H 'content-type: application/json' \
  2. -H 'Authorization: token 1d0e52789e7d8e042bc870d359605344747b5216' \
  3. --data '{"name": "room name"}' http://localhost/room/validator/name/ ```

Response

  1. # 不存在
  2. {
  3. "code": 0,
  4. "message": ""
  5. }
  6. # 存在
  7. {
  8. "code": -3,
  9. "message": "房间名字已经存在"
  10. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注