Advanced REST Client是Chrome瀏覽器下的一個插件,通過它能夠發送http、https、WebSocket請求。在Chrome商店下搜索Advanced REST Client,就可以找到

Advanced REST Client的界面

Advanced REST Client在google code的地址:http://code.google.com/p/chrome-rest-client/
以下來介紹Advanced REST Client發送請求的方法
1. 發送http請求
http://httpbin.org/有現成的get、post接口,能夠直接使用
1.1 http get
在URL欄輸入http://httpbin.org/get

點"Send"button。發送成功后,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”button。連接成功后,就可以發送消息

輸入"Test",然后點"Send"button
第一個”Test”是Advanced REST Client發送的request,第二個”Test”是Server返回的response

點擊”Disconnect”button,就可以斷開連接
