Proposal for Http Request Headers in State

From Open Annotation Community Group
Jump to: navigation, search

Problem: There is a need to annotate/encode Http headers into an annotation. How should hasState be represented?

Solutions: Ranging from simple strings that carry the headers to inline graphs and structured resources.

Option 1

The first option is to have properties for each of the five Http headers (accept, user-agent, accept-charset, accept-language, accept-encoding) that are accepted by (RFC?). This option would be comparable to the oa:when property.

Example 1


Option 2

Option 2 is to have the headers defined like fragmentSelectors or svgSelectors. The rdf:type of oa:State would be for example oax:HttpRequestState. The rdf:value would include the headers and the corresponding values (Example 1a). Example 1b shows how the http information would look formatted as a ContentAsText property like an svgSelector.

Example 2a


Example 2b


Option 2 pros-

  • Simple
  • Most of the solution is already implemented within the core/extension spec

Option 2 cons-

  • (can't negotiate - Tom's comment)

Option 3

The last option is to structure the headers like a structured resource or inline body.

Example 3a


Example 3b