为了说明我的问题,我从 Apiary.io 蓝图教程中制作了一个精简示例。
FORMAT: 1A
# Gist Fox API
# Group Gist
Gist-related resources of *Gist Fox API*.
## Gists Collection [/gists{?since}]
### List All Gists [GET]
+ Parameters
+ since (optional, string) ... Timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ` Only gists updated at or after this time are returned.
+ Response 200
{
items: []
}
### Create a Gist [POST]
To create a new Gist simply provide a JSON hash of the *description* and *content* attributes for the new Gist.
+ Request (application/json)
{
"description": "Description of Gist",
"content": "String content"
}
+ Response 201
{
}
然后在我的养蜂场文档中,我得到以下信息:
GET /gists{?since}
POST /gists{?since}
since
但是,对我来说,仅将查询参数用于 GET 请求是有意义的。不幸的是,我没有找到实现此结果的方法:
GET /gists{?since}
POST /gists
有可能吗?