Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$format query option #99

Open
r1mar opened this issue Sep 7, 2022 · 0 comments
Open

$format query option #99

r1mar opened this issue Sep 7, 2022 · 0 comments

Comments

@r1mar
Copy link
Contributor

r1mar commented Sep 7, 2022

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.

r1mar added a commit to r1mar/node-odata that referenced this issue Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant