In a previous post, I discussed the design of go-restful which is a package for building REST-style WebServices using the Google Go programming language. Today, I completed the implementation of that package which provides the basics: Creating a WebService with Routes (mapping between Http Request and a Go function) Each Route requires information about the Http method (GET,POST,...), URL Path (/users..), Mime-types and the function it binds to Functions get passed in a Request and a Response The Request is used to access Path and Query parameters , Headers and request content (XML, JSON,.
I have been using JAX-RS for many REST-based service implementations in Java. As part of my journey into the Google Go programming language, I am exploring designs for such REST support using the standard net/http package in Go. JAX-RS provides a set of Annotation classes which can be used to add meta-data to classes, methods and method arguments. In JAX-RS these annotation are used to specify the mapping between a Http Request to a Java method and its arguments.