自定义Headers

Nine edited this page Dec 3, 2017 · 2 revisions

自定义headers

v2接口中目前支持两种自定义headers方式:

1. 将自定义headers写在请求头里

POST /v2 HTTP/1.1
Host: bird.ioliu.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
...
customHeaderKey1: customHeaderVal1
customHeaderKey2: customHeaderVal2

2. 将自定义headers作为参数发送

POST /v2 HTTP/1.1
Host: bird.ioliu.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

'params':{
    "s": "女儿情", 
    "offset": 10, 
    "limit": 10, 
    "type": 1,
    "headers":{
        "customHeaderKey1": "customHeaderVal1",
        "customHeaderKey2": "customHeaderVal2" 
    }
}
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.