Request¶
requestの定義です。
Definitions¶
Request¶
| Key | Type | Description | Example | Default |
|---|---|---|---|---|
| path | string | リクエストのPath | /repositories | |
| name | (string) | リクエストの名称 | request1 | |
| qs | (dict[string[]]) | リクエストのクエリ | a: [1] b: [2] |
{} |
| headers | (dict[string]) | リクエストヘッダ | header1: 1 header2: 2 |
{} |
| method | (HttpMethod) | HTTPメソッド | POST | GET |
| raw | (string) | rawのBody |
a=100&b=200 | |
| form | (dict[string[]]) | x-www-form-urlencodedのBody |
key: [value1, value2] | |
| json | (dict) | application/jsonのBody |
{id: 1, name: 'Ichi'} |
HttpMethod
| Name | Description |
|---|---|
| GET | HTTPのGETメソッド |
| POST | HTTPのPOSTメソッド |
Examples¶
/sample/one?word=hoge&size=10 相当の hogehoge という名前のリクエスト¶
path: /sample/one
name: hogehoge
qs:
word: [hoge]
size: ["10"]
/sample/two 相当で リクエストヘッダが x-header="1", y-header="2" である名も無きリクエスト¶
path: /sample/two
headers:
x-header: "1"
y-header: "2"
/post に content-type が x-www-form-urlencoded で p1=11&p2=22 のクエリをリクエスト¶
path: /post
method: POST
form:
p1: [11]
p2: [22]
/post に raw string で p1=11&p2=22 のクエリをリクエスト¶
path: /post
method: POST
raw: "p1=11&p2=22"