官术网_书友最值得收藏!

Summary

In this chapter, we gave an introduction to the REST API. We saw that REST is not a protocol, but an architectural pattern. HTTP is the actual protocol on which we can implement our REST service. We jumped into the fundamentals of the REST API to be clear about what they actually are. Then we explored types of web services. Before REST, we have something called SOAP, which uses XML as the data format. REST operates on JSON as the primary format. REST has verbs and status codes. We saw what a given status code refers to. We built a simple service which serves the Roman numerals for given numbers. In this process, we also saw how to package a Go project. We understood the GOPATH environment variable. It is a workspace defining a variable in Go. All packages and projects reside in that path. We then saw how to reload a development project on the fly with the help of supervisord and Gulp. These are node tools but can help us to keep our Go project up and running.

In the next chapter, we dig deeper into URL routing. Starting from the built-in router, we explore Gorilla Mux, a powerful URL routing library.

主站蜘蛛池模板: 长泰县| 衡阳县| 凤山市| 麦盖提县| 阿瓦提县| 怀化市| 博湖县| 彰武县| 丹凤县| 宁安市| 株洲市| 萨迦县| 吴忠市| 海安县| 汝州市| 凤台县| 贵州省| 新巴尔虎左旗| 普格县| 达日县| 锡林浩特市| 北碚区| 高要市| 安溪县| 姜堰市| 孝昌县| 绥宁县| 岱山县| 万安县| 云阳县| 牙克石市| 彭阳县| 横峰县| 鸡西市| 伊宁县| 新余市| 承德县| 循化| 财经| 惠安县| 庆阳市|