Is there any default media type when the query is not specified with any supported media types in RESTCONF ?
Is there a default media type for GET and other methods
120 Views Asked by Suma At
2
There are 2 best solutions below
0

The final RFC stood by the draft, just as @predi said:
On Message Encoding, Section 5.2:
If there was no request input, then the default output encoding is XML or JSON, depending on server preference. File extensions encoded in the request are not used to identify format encoding.
And Error Message Response, Section 7.1
If the client did not specify an "Accept" header, then the same structured syntax name suffix used in the request message SHOULD be used, or the server MAY choose any supported message-encoding format. If there is no request message, the server MUST select "application/yang-data+xml" or "application/yang-data+json", depending on server preference.
No. There is no standard default. This is server implementation dependent, so do not rely on it.
From draft-ietf-netconf-restconf-17, Section 5.3, Message Encoding:
And from draft-ietf-netconf-restconf-17, Section 7.1, Error Response Message: