Public
Documentation Settings

APIJSON

POST查询

http://localhost:9501/get
Bodyraw (json)
json
{
    "[]": {
        "Message": {
        },
        "User": {
            "id@": "[]/Message/user_id"
        }
    },
    "debug": true
}
Example Request
curl
curl --location 'http://test.local/get' \
--data '{
    "User":{}
}'
200 OK
Example Response
json
{
  "code": 200,
  "msg": "Success!",
  "User": {
    "id": 1,
    "username": "abigeater",
    "email": "abigeater@163.com",
    "password": "1",
    "create_time": "2021-11-02 06:57:56"
  }
}
Connection

close

Content-Length

137

Content-Encoding

gzip

Content-Type

application/json

Date

Fri, 05 Nov 2021 09:02:01 GMT

Server

nginx/1.21.0

POST新增数据

localhost:9501/post
Bodyraw (json)
json
{
    "message[]": [
        {
            "user_id":1,
            "message": "1"
        },
        {
            "user_id":1,
            "message": "122"
        },
        {
            "user_id":2,
            "message": "3333"
        }
    ]
}
Example Request
curl
curl --location 'localhost:9501/post' \
--data-raw '{
    "User": {
        "username":"u2",
        "email": "e@2.com",
        "password": "p2"
    }
}'
200 OK
Example Response
json
{
  "code": 200,
  "msg": "Success!",
  "User": {
    "id": 1
  }
}
Content-Type

application/json

Server

Hyperf

Connection

keep-alive

Date

Sat, 06 Nov 2021 08:53:02 GMT

Content-Length

49

Content-Encoding

br

POST修改数据

localhost:9501/put
Bodyraw (json)
json
{
    "User": {
        "id": 1,
        "username": "ttt1"
    }
}
Example Request
curl
curl --location 'localhost:9501/put' \
--data '{
    "User": {
        "id{}": [14,15,16],
        "username": "tt1"
    }
}'
200 OK
Example Response
json
{
  "code": 200,
  "msg": "Success!",
  "User": {
    "id[]": [
      14,
      15,
      16
    ],
    "count": 3
  }
}
Content-Type

application/json

Server

Hyperf

Connection

keep-alive

Date

Sat, 06 Nov 2021 09:15:38 GMT

Content-Length

70

Content-Encoding

br

POST删除数据

http://localhost:9501/delete
Bodyraw (json)
json
{
    "User":{
        "id{}":[18,19,20]
    }
}
Example Request
curl
curl --location 'http://localhost:9501/delete' \
--data '{
    "User":{
        "id": 17
    }
}'
200 OK
Example Response
json
{
  "code": 200,
  "msg": "Success!",
  "User": {
    "id": 17
  }
}
Content-Type

application/json

Server

Hyperf

Connection

keep-alive

Date

Sat, 06 Nov 2021 09:16:54 GMT

Content-Length

50

Content-Encoding

br