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

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.

主站蜘蛛池模板: 高尔夫| 平山县| 新营市| 岐山县| 临沭县| 外汇| 信丰县| 偏关县| 汝南县| 正宁县| 建湖县| 巫溪县| 墨脱县| 高平市| 阿拉善盟| 绥中县| 苏尼特右旗| 潮州市| 白河县| 马尔康县| 凉城县| 聂拉木县| 怀化市| 怀安县| 大姚县| 津市市| 赣榆县| 商城县| 涟水县| 昭平县| 铜川市| 彭山县| 尼勒克县| 江津市| 富蕴县| 甘德县| 师宗县| 丹巴县| 玉树县| 山阴县| 农安县|