There are several HTTP header lines utilized in RESTCONF [RFC8040] messages. Messages are not limited to the HTTP headers listed in this section.

HTTP defines which header lines are required for particular circumstances. There are some request headers that are used within RESTCONF, usually applied to data resources. The following table summarize the headers most relevant in RESTCONF message requests:


RESTCONF Request Headers


Name

Description

Accept
Response Content-Types that are acceptable 
Content-Type The media type of the request body 
Host  The host address of the server 
If-Match Only perform the action if the entity matches ETag 
If-Modified-Since Only perform the action if modified since time 
If-Unmodified-Since Only perform the action if unmodified since time 


The following table summarize the headers most relevant in RESTCONF message responses: 

RESTCONF Response Headers


Name
Description
Allow

Valid actions when 405 error returned 

Cache-Control

The cache control parameters for the response

Content-Type

The media type of the response message-body

Date

The date and time the message was sent 

ETag

An identifier for a specific version of a resource 

Last-Modified

The last modified date and time of a resource 

Location

Theresource identifier for a newly created resource


--restconf-strict-accept is netconfd-pro CLI parameter that specifies the server's validation rules for Accept header entries. If set to 'true' the server will only accept requests with normative Accept headerentries specified in RESTCONF RFC 8040.

If set to 'false', the server will try to accept not normative header entries as well. The default is false.


Normative Accept header example:  

application/yang-data+xml,application/yang-data+json;q=0.9


Normative Content-Type headers:

application/yang-data+xml

application/yang-patch+json


Acceptable not normative Accept headers:

application/xml

application/json


Acceptable not normative Content-Type headers:

application/xml

application/json

text/xml