Skip to content

Instantly share code, notes, and snippets.

@mikekelly
Created October 12, 2010 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mikekelly/622024 to your computer and use it in GitHub Desktop.
Save mikekelly/622024 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>Example of HTTP microformat</title>
</head>
<body>
<div class="http">
<div class="request">
<div class="line">
<span class="method">POST</span> <span class="resource">/foo/bar</span> <span class="http-version">HTTP/1.1</span>
</div>
<ul class="headers">
<li><span class="field">Host</span>: <span class="value">www.example.com</span></li>
<li><span class="field">If-None-Match</span>: <span class="value">123123123123</span></li>
</ul>
<pre class="body">
{ "foo" : "bar" }
</pre>
</div>
<div class="response">
<div class="line">
<span class="http-version">HTTP/1.1</span> <span class="status">200 OK</span>
</div>
<ul class="headers">
<li><span class="field">Content-Type</span>: <span class="value">application/json</span></li>
<li><span class="field">ETag</span>: <span class="value">321321321321</span></li>
</ul>
<pre class="body">
{ "boo" : "doo" }
</pre>
</div>
</div>
</body>
</html>
@tobyink
Copy link

tobyink commented Nov 17, 2010

Created a RDFa version here https://gist.github.com/703225. Perhaps not quite as simple, but it has the advantage that it works in RDFa parsers such as http://www.w3.org/2007/08/pyRdfa/ today rather than having to wait for people to implement a microformat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment