Advanced REST Client是 Chrome 瀏覽器下的一個插件,經過它能夠發送 http、https、WebSocket 請求。在 Chrome 商店下搜索 Advanced REST Client,便可找到web
若是搜索不到的可到CSDN 下載:chrome
http://download.csdn.net/detail/li1669852599/9547748瀏覽器
1.下載插件:Advanced Rest Clientwebsocket
Advanced REST Client的界面socket
Advanced REST Client在 google code 的地址:http://code.google.com/p/chrome-rest-client/post
下面來介紹 Advanced REST Client發送請求的方法學習
1. 發送 http 請求測試
http://httpbin.org/ 有現成的 get、post 接口,能夠直接使用google
1.1 http get.net
在 URL 欄輸入 http://httpbin.org/get
點"Send"按鈕。發送成功後, Advanced REST Client 會列出Request/Response headers :
返回結果:
1.2 http post
在 URL 欄輸入 http://httpbin.org/post ,選在 」POST」類型,在」Payload」欄輸入 data,最後設置 」Content-Type」
返回結果:
2. 發送 https 請求
使用方法跟發送 http 請求同樣。 https://httpbin.org/ 有現成的 get、post 接口,能夠本身試試
3. 發送 WebSocket 請求
Advanced REST Client支持發送Websocket 請求,經過 ws://echo.websocket.org,能夠進行 Websocket 的測試
點擊左側的」Socket」,而後在 URL 欄輸入 ws://echo.websocket.org
點擊右側的」Connect」按鈕。 鏈接成功後,便可發送消息
輸入"Test",而後點"Send"按鈕
第一個」Test」是Advanced REST Client發送的request ,第二個 」Test」是 Server 返回的 response