Skip to content

$format query option #99

@r1mar

Description

@r1mar

Hello Zack,

a feature that is not implemented too.

http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#_Toc31358963
11.2.11 System Query Option $format
The $format system query option specifies the media type of the response.

The $format query option, if present in a request, MUST take precedence over the value(s) specified in the Accept request header.

The value of the $format system query option is a valid internet media type, optionally including parameters.

In addition, format-specific abbreviations may be used, e.g. json for application/json, see [OData-JSON], but format parameters MUST NOT be appended to the format abbreviations.

Regards,
Richard

Example 74: the request

GET http://host/service/Orders?$format=application/json;metadata=full

is equivalent to a request with an Accept header using the same media type; it requests the set of Order entities represented using the JSON media type including full metadata, as defined in [OData-JSON].

Example 75: the request

GET http://host/service/Orders?$format=json

is equivalent to a request with the Accept header set to application/json; it requests the set of Order entities represented using the JSON media type with minimal metadata, as defined in [OData-JSON].

In metadata document requests, the values application/xml and application/json, along with their subtypes and parameterized variants, as well as the format-specific abbreviations xml and json, are reserved for this specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions