- Building RESTful Web services with Go
- Naren Yellavula
- 118字
- 2021-07-02 20:14:08
Introducing httprouter, a lightweight HTTP router
httprouter, as the name suggests, routes the HTTP requests to particular handlers. Compared to the basic router, it has the following features:
- Allows variables in the route paths
- It matches the REST methods (GET, POST, PUT, and so on)
- No compromising on performance
We are going to discuss these qualities in more detail in the following section. Before that, there are a few noteworthy points that make httprouter an even better URL router:
- httprouter plays well with the inbuilt http.Handler
- httprouter explicitly says that a request can only match to one route or none
- The router's design encourages building sensible, hierarchical RESTful APIs
- You can build efficient static file servers
推薦閱讀
- 社交網(wǎng)絡(luò)對齊
- Truffle Quick Start Guide
- 物聯(lián)網(wǎng)檢驗(yàn)檢測技術(shù)
- 2018網(wǎng)信發(fā)展報(bào)告
- 計(jì)算機(jī)網(wǎng)絡(luò)與通信(第2版)
- Kong網(wǎng)關(guān):入門、實(shí)戰(zhàn)與進(jìn)階
- 網(wǎng)管工具使用與技巧大全
- 人人都該都懂的互聯(lián)網(wǎng)思維
- AIoT應(yīng)用開發(fā)與實(shí)踐
- 5G非正交多址接入技術(shù):理論、算法與實(shí)現(xiàn)
- Qt5 Python GUI Programming Cookbook
- 數(shù)字王國里的虛擬人:技術(shù)、商業(yè)與法律解讀
- React Design Patterns and Best Practices(Second Edition)
- OSPF協(xié)議原理與功能拓展
- Elm Web Development