<?xml version="1.0"?><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"><head><title>EER - ERIS over HTTP</title><style type="text/css">body {
    max-width: 900px;
    margin-top: 3em;
    margin-bottom: 5em;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    line-height: 1.6;
    font-family: &quot;courier new&quot;, courier, monospace;
    font-size: 12pt;
}

#logo {
    margin: auto;
    width: 70px;
    display: block;
}

nav ul {
    list-style-type: none;
    display: flex;
    margin: 0;
    padding: 0;
}
nav ul li {
    margin: auto; padding: 2.0rem;
}
nav ul li a::before {
    content: &quot;[&quot;
}
nav ul li a::after {
    content: &quot;]&quot;
}

.banner {width: 25%; display: block; margin: auto; padding: 2.0rem;}
.banners {display: flex;}

h1 {text-align: center;}

h2 {margin-top: 4em; text-align: center;}

h3 {margin-top: 2em;}

table {border-collapse: collapse; width: 100%; margin: 1.5rem 0;}

td, th {border: 1px solid black; text-align: left; padding: 0.5rem;}

th {background: goldenrod; font-weight: bold;}

pre {
    max-width: 100%;
    overflow: auto;
}

code {
    font-size: 90%;
    background-color: whitesmoke;
}


figure {width: 80%; display: block; margin: auto; padding: 2.0rem;}
img { margin: auto; max-width: 70%; }
footer { text-align: right; font-weight: 200; padding-top: 5em; }
footer span { padding: 0 0.5em 0 0.5em; }
</style></head><body><svg id="logo" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><defs><clipPath id="inside"><circle cx="16" cy="16" r="12" /></clipPath></defs><circle cx="16" cy="16" r="14" fill="goldenrod" stroke="black" stroke-width="2" /><path id="symbol" d="M 6,6 A 8,8 0 0,1 6,26 M 16,1 V 31 M 26,6 A 8,8 0 0,0 26,26" fill="none" stroke="black" stroke-width="2" clip-path="url(#inside)" /></svg><nav><a href="index.html">back to index</a></nav><article><h1>ERIS over HTTP</h1><p>When you think of ERIS you might think of fancy protocols such as <a href="https://ipfs.io">IPFS</a>, <a href="named-data.net">NDN</a> or <a href="https://datatracker.ietf.org/doc/html/rfc1149">IPoAC</a>. But ERIS can also be used over ye good old HTTP. <a href="https://datatracker.ietf.org/doc/html/rfc2169">RFC2169</a> describes a convention for generic URN resolution over HTTP. This can be easily adapted for our use.</p><h2>Resolving blocks</h2><p>Blocks of ERIS encoded content can be <a href="http://purl.org/eris#name-block-urn">referenced by URNs</a>. For example the URN:</p><pre><code>urn:blake2b:H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ </code></pre><p>The endpoint we use is the <code>/uri-res/N2R</code>. This is the <a href="https://datatracker.ietf.org/doc/html/rfc2169#section-3.3">N2R</a> endpoint defined by <a href="https://datatracker.ietf.org/doc/html/rfc2169">RFC2169</a> (N2R stands for Name-to-Resource).</p><p>A block can be resolved with a HTTP <code>GET</code> request:</p><pre><code>GET /uri-res/N2R?urn:blake2b:H77AGSYKAVTQPUHODJTQA7WZPTWGTTKLRB2GLMF5H53NEKFJ3FUQ </code></pre><p>The endpoint should return the block using standard HTTP mechanisms. The <code>Content-type</code> header should be set to the MIME type <code>application/octet-stream</code>.</p><h2>Resolving ERIS encoded content</h2><p>It is recommenced that applications resolve individual blocks via the HTTP(S) endpoint described above and decode content from the blocks locally. This prevents resolver services from being able to decode content and allows the integrity of the content to be verified.</p><p>In certain circumstances it may be necessary to decode content remotely and retrieve it. For this also the <code>/uri-res/N2R</code> endpoint should be used.</p><p>For example:</p><pre><code>GET /uri-res/N2R?urn:eris:BIAT2G3VUQWWDDSHAQ4OSUPA4D3LVVLXZQQ34VCDUGOCYGOADWKABBOVWQNT4D4JI3T65ZV4F2FR6YCSAY3T46M5B2BCEUC2G3JJFGWKMI</code></pre><p>The endpoint should return the decoded content using standard HTTP mechanisms. The <code>Content-type</code> header should be set to the MIME type <code>application/octet-stream</code> or if possible an inferred MIME type of the content.</p></article><footer><span><a href="https://codeberg.org/eris/eer/" title="Git repository from which this site is generated">Git</a></span><span><a href="https://creativecommons.org/licenses/by-sa/4.0/" title="Content licensed as CC-BY-SA-4.0">CC-BY-SA-4.0</a></span></footer></body></html>