var defaultRequestContentType … type Request … func NewRequest(httpRequest *http.Request) *Request { … } // If ContentType is missing or */* is given then fall back to this type, otherwise // a "Unable to unmarshal content of type:" response is returned. // Valid values are restful.MIME_JSON and restful.MIME_XML // Example: // // restful.DefaultRequestContentType(restful.MIME_JSON) func DefaultRequestContentType(mime string) { … } // PathParameter accesses the Path parameter value by its name func (r *Request) PathParameter(name string) string { … } // PathParameters accesses the Path parameter values func (r *Request) PathParameters() map[string]string { … } // QueryParameter returns the (first) Query parameter value by its name func (r *Request) QueryParameter(name string) string { … } // QueryParameters returns the all the query parameters values by name func (r *Request) QueryParameters(name string) []string { … } // BodyParameter parses the body of the request (once for typically a POST or a PUT) and returns the value of the given name or an error. func (r *Request) BodyParameter(name string) (string, error) { … } // HeaderParameter returns the HTTP Header value of a Header name or empty if missing func (r *Request) HeaderParameter(name string) string { … } // ReadEntity checks the Accept header and reads the content into the entityPointer. func (r *Request) ReadEntity(entityPointer interface{ … } // SetAttribute adds or replaces the attribute with the given value. func (r *Request) SetAttribute(name string, value interface{ … } // Attribute returns the value associated to the given name. Returns nil if absent. func (r Request) Attribute(name string) interface{ … } // SelectedRoutePath root path + route path that matched the request, e.g. /meetings/{id}/attendees // If no route was matched then return an empty string. func (r Request) SelectedRoutePath() string { … } // SelectedRoute returns a reader to access the selected Route by the container // Returns nil if no route was matched. func (r Request) SelectedRoute() RouteReader { … }