Skip to content

Commit 04f33ec

Browse files
authored
Update format.mdx
1 parent 66e1655 commit 04f33ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/api/format.mdx

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,24 @@ import ApiSchema from '@theme/ApiSchema';
1313
POST /json-example
1414
Accept: application/json
1515
Content-Type: application/json
16+
User-Agent: my-new-app/1.0
1617
1718
{"a":"b","1":2}
1819
```
1920

2021
```
2122
POST /form-example
2223
Accept: application/json
23-
Content-Type: application/x-www-form-urlencoded
24+
Content-Type: application/x-www-form-urlencoded
25+
User-Agent: my-new-app/1.0
2426
2527
a=b&1=2
2628
```
2729

2830
本平台的请求返回如无特殊说明,均为 JSON 格式,但仍应该带上 `Accept: application/json` 请求头。
2931

32+
为了在调试和查错时更加方便快捷,我们强烈建议应用开发方使用自己的独特 `User-Agent` 标识,例如上面例子中的 `my-new-app/1.0`
33+
3034
平台的返回值会在每个 API 的说明页面详细给出。但他们执行成功与否均会以 HTTP 状态表示,如:
3135
- `200 OK` 请求成功完成。
3236
- `204 No Content` 请求成功完成,且没有任何内容需要返回。

0 commit comments

Comments
 (0)