code: func (h *protocolHandler) routeToImpl(method string, request []byte) (interface{}, error) {
  	switch method {
  	case "GetOAuthToken":
  		req := &rpcs.GetOAuthTokenRequest{}
  		if err := json.Unmarshal(request, req); err != nil {
  			return nil, &protocolError{
  				Status:  http.StatusBadRequest,
  				Message: fmt.Sprintf("Not JSON body - %s", err),
  			}
  		}
  		return h.handleGetOAuthToken(req)
  	default:
  		return nil, &protocolError{
  			Status:  http.StatusNotFound,
  			Message: fmt.Sprintf("Unknown RPC method %q", method),
  		}
  	}
  }
docs: // routeToImpl calls appropriate RPC method implementation.