restful接口的幾點(diǎn)說(shuō)明
??? 1)url后面添加參數(shù),可以直接通過(guò)&符號(hào)鏈接起來(lái)
例如:http://192.168.18.84/axis-cgi/com/ptz.cgi?camera=1&query=position
也可以通過(guò)Params的鍵值對(duì)進(jìn)行填充
創(chuàng)新互聯(lián)建站網(wǎng)站建設(shè)由有經(jīng)驗(yàn)的網(wǎng)站設(shè)計(jì)師、開(kāi)發(fā)人員和項(xiàng)目經(jīng)理組成的專業(yè)建站團(tuán)隊(duì),負(fù)責(zé)網(wǎng)站視覺(jué)設(shè)計(jì)、用戶體驗(yàn)優(yōu)化、交互設(shè)計(jì)和前端開(kāi)發(fā)等方面的工作,以確保網(wǎng)站外觀精美、網(wǎng)站設(shè)計(jì)制作、成都網(wǎng)站建設(shè)易于使用并且具有良好的響應(yīng)性。
??? 2)認(rèn)證可以通過(guò)Authorization進(jìn)行添加,根據(jù)適當(dāng)?shù)腡ype類型進(jìn)行選擇,也可以通過(guò)Header進(jìn)行認(rèn)證換算后填充,例如
Authorization: cm9vdDpyb290
??? 3)Postman指定了Connection: keep-alive屬性,因此需要服務(wù)器端主動(dòng)斷開(kāi)鏈接,否則會(huì)出現(xiàn)如下的問(wèn)題: 一直提示Canceling Request,即使是收到了回復(fù)
??? 4)使用https進(jìn)行請(qǐng)求的時(shí)候,如果返回異常,如下:
Could not get any response
There was an error connecting to https://192.168.58.42:8080/cs/restfull/operationRestfullApi/excuteSqlByCode.
Why this might have happened:
The server couldn't send a response:
Ensure that the backend is working properly
Self-signed SSL certificates are being blocked:
Fix this by turning off 'SSL certificate verification' in Settings > General
Proxy configured incorrectly
Ensure that proxy is configured correctly in Settings > Proxy
Request timeout:
Change request timeout in Settings > General
解決方案: 打開(kāi)settings界面,找到General界面,然后關(guān)閉SSL certificate verification即可,是不需要認(rèn)證證書(shū)