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

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.

主站蜘蛛池模板: 仁布县| 壤塘县| 咸丰县| 彭州市| 沁源县| 渑池县| 义乌市| 黄山市| 洛隆县| 大关县| 镇平县| 迁安市| 连南| 延安市| 商洛市| 茂名市| 香格里拉县| 贵溪市| 星子县| 渭南市| 兴业县| 遂平县| 商洛市| 绿春县| 博罗县| 凤庆县| 永和县| 新晃| 巴彦县| 涟源市| 延吉市| 广水市| 垣曲县| 宝兴县| 扎鲁特旗| 本溪市| 洛川县| 丹寨县| 蒲城县| 南雄市| 兴安盟|