Summary
In this chapter, you've been introduced to the server side of web programming. You've learned how to accept requests from HTTP clients and respond in an appropriate manner. You've learned how to separate the possible requests into different areas of an HTTP server via paths and sub-paths. For this, you used a simple routing mechanism with the standard Go HTTP
package. You've seen how to return your response in order to suit different consumers: JSON responses for synthetic clients, and HTML pages for human access. You've seen how to use templates in order to format your plain text and HTML messages, using the standard templating package. You've learned how to serve and use static resources, serving them directly through a default file server or through a template object. You've also learned what a REST
service is, and although we have not built one together, you have all the knowledge necessary to create one, provided you follow the description...