-
-
Save tobyink/703225 to your computer and use it in GitHub Desktop.
Describing HTTP Requests and Reponses in RDFa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html | |
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | |
xmlns:http="http://www.w3.org/2006/http#" | |
xmlns:cnt="http://www.w3.org/2008/content#"> | |
<head> | |
<title>Example of HTTP in RDFa</title> | |
<style type="text/css"> | |
div[typeof="http:Request"] | |
{ | |
border: 1px solid black; | |
background-color:silver; | |
} | |
div[typeof="http:Request"] pre | |
{ | |
background-color:white; | |
margin: 0; | |
padding: 0.67em 0.33em; | |
} | |
div[typeof="http:Request"] div | |
{ | |
padding: 0.1em; | |
} | |
div[typeof="http:Request"] p | |
{ | |
margin: 0; | |
padding: 0; | |
} | |
div[typeof="http:Request"] span[property="http:statusCodeNumber"], | |
div[typeof="http:Request"] span[property="http:reasonPhrase"], | |
div[typeof="http:Request"] span[property="http:fieldName"], | |
div[typeof="http:Request"] span[property="http:methodName"] | |
{ | |
font-weight:bold; | |
font-style: italic; | |
} | |
div[typeof="http:Request"] span[property="http:fieldName"] | |
{ | |
font-style: normal; | |
} | |
</style> | |
</head> | |
<body> | |
<!-- Request --> | |
<div typeof="http:Request"> | |
<div> | |
<span property="http:methodName">POST</span> | |
<span property="http:abs_path">/foo/bar</span> | |
<span property="http:httpVersion">HTTP/1.1</span> | |
</div> | |
<div rel="http:headers"> | |
<p rel="rdfs:member"> | |
<span property="http:fieldName">Host</span>: | |
<span property="http:fieldValue">www.example.org</span> | |
</p> | |
<p rel="rdfs:member"> | |
<span property="http:fieldName">If-None-Match</span>: | |
<span property="http:fieldValue">123123123123</span> | |
</p> | |
</div> | |
<div rel="http:body"> | |
<pre property="cnt:chars">{ "foo" : "bar" }</pre> | |
</div> | |
<!-- Response --> | |
<div rel="http:resp"> | |
<div> | |
<span property="http:httpVersion">HTTP/1.1</span> | |
<span property="http:statusCodeNumber">200</span> | |
<span property="http:reasonPhrase">OK</span> | |
</div> | |
<div rel="http:headers"> | |
<p rel="rdfs:member"> | |
<span property="http:fieldName">Content-Type</span>: | |
<span property="http:fieldValue">application/json</span> | |
</p> | |
<p rel="rdfs:member"> | |
<span property="http:fieldName">ETag</span>: | |
<span property="http:fieldValue">321321321321</span> | |
</p> | |
</div> | |
<div rel="http:body"> | |
<pre property="cnt:chars">{ "boo" : "doo" }</pre> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
:o