Add a utility method for parsing REST-style URLs.
Run gofmt.