quick-start
  1. post
quick-start
  • events
    • 根据id删除
      DELETE
    • 查询所有(含分页)
      GET
    • 根据id查询
      GET
    • 添加
      POST
    • 修改
      PATCH
  • post
    • 创建post
      POST
    • 查询所有
      GET
    • 根据id查询
      GET
    • 更新post
      PATCH
    • 根据id删除
      DELETE
    • 分页查询
      GET
  • 注册
    POST
  • 通过token获取user信息
    GET
  • 登录
    POST
  1. post

创建post

开发中
测试环境
http://test-cn.your-api-server.com
测试环境
http://test-cn.your-api-server.com
POST
http://test-cn.your-api-server.com
/posts

请求参数

Header 参数
Authorization
string 
可选
示例值:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTA5NjE0OTUsInN1YiI6MTB9.L5k45Gx7OvCRBEBTcyWaCpfGaa873xs3uz924EWuXjA
Body 参数application/json
title
string 
必需
body
string 
必需
示例
{
    "title": "string",
    "body": "string"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://test-cn.your-api-server.com/posts' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTA5NjE0OTUsInN1YiI6MTB9.L5k45Gx7OvCRBEBTcyWaCpfGaa873xs3uz924EWuXjA' \
--header 'Content-Type: application/json' \
--data-raw '{
    "title": "string",
    "body": "string"
}'

返回响应

🟢200成功
application/json
Body
post
object 
必需
ID
integer 
必需
CreatedAt
string 
必需
UpdatedAt
string 
必需
DeletedAt
null 
必需
Title
string 
必需
Body
string 
必需
示例
{
    "post": {
        "ID": 0,
        "CreatedAt": "string",
        "UpdatedAt": "string",
        "DeletedAt": null,
        "Title": "string",
        "Body": "string"
    }
}
修改于 2023-07-03 07:42:01
上一页
修改
下一页
查询所有
Built with