Do not talk about HTTP clients but Context Loaders in API, Karlton was right again
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sun, 17 Feb 2013 13:41:13 +0100
changeset 1283 66a38a8f9b45
parent 1282 884231056eb4
child 1284 246d44385d11
Do not talk about HTTP clients but Context Loaders in API, Karlton was right again

It may be that other protocols are used to download contexts. See Dave's comment at https://github.com/json-ld/json-ld.org/issues/213#issuecomment-13623166.

I renamed the callbacks to LoadContextCallback and ContextLoadedCallback. The option in JsonLdOptions is now simply called loadContext making it a nicer interface (options.loadContext(url)).

I will close #213 directly. @dlongley, feel free to reopen the issue if you feel the naming is still not clear enough.
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Sun Feb 17 12:40:06 2013 +0100
+++ b/spec/latest/json-ld-api/index.html	Sun Feb 17 13:41:13 2013 +0100
@@ -4693,26 +4693,26 @@
     </section>
 
     <section>
-      <h3>HttpClientCallback</h3>
-      <p>The <a>HttpClientCallback</a> defines the callback that custom HTTP
-        clients have to implement to be used to retrieve remote contexts.</p>
-
-      <dl title="callback HttpClientCallback = void" class="idl">
+      <h3>LoadContextCallback</h3>
+      <p>The <a>LoadContextCallback</a> defines the callback that custom context loaders
+        have to implement to be used to retrieve remote contexts.</p>
+
+      <dl title="callback LoadContextCallback = void" class="idl">
         <dt>DOMString url</dt>
-        <dd>The URL of the remote context to retrieve.</dd>
-        <dt>ContextRetrievalCallback callback</dt>
+        <dd>The URL of the remote context to load.</dd>
+        <dt>ContextLoadedCallback callback</dt>
         <dd>The callback that is called when the remote context has been
-          successfully retrieved or an error preventing its retrieval has been
+          successfully loaded or an error preventing its loading has been
           detected.</dd>
       </dl>
     </section>
 
     <section>
-      <h3>ContextRetrievalCallback</h3>
-      <p>The <a>ContextRetrievalCallback</a> is called in response to a call
-        of the <a>HttpClientCallback</a>.</p>
-
-      <dl title="callback ContextRetrievalCallback = void" class="idl">
+      <h3>ContextLoadedCallback</h3>
+      <p>The <a>ContextLoadedCallback</a> is called in response to a call
+        of the <a>LoadContextCallback</a>.</p>
+
+      <dl title="callback ContextLoadedCallback = void" class="idl">
         <dt>JsonLdError error</dt>
         <dd>If the value is <tref>null</tref>, then no issue was detected
           during processing. Otherwise, a processing issue was detected and
@@ -4720,10 +4720,10 @@
           errors MUST have a <a>JsonLdErrorCode</a> of
           <code class="error">loading remote context failed</code>.</dd>
         <dt>DOMString url</dt>
-        <dd>The final URL of the retrieved JSON-LD context. This is important
+        <dd>The final URL of the loaded JSON-LD context. This is important
           to handle HTTP redirects properly.</dd>
         <dt>DOMString context</dt>
-        <dd>The unparsed content of the retrieved JSON-LD context.</dd>
+        <dd>The raw content of the retrieved JSON-LD context.</dd>
       </dl>
     </section>
   </section>
@@ -4752,10 +4752,10 @@
           one element with that element during compaction. If set to <code>false</code>,
           all arrays will remain arrays even if they have just one element.
         </dd>
-        <dt>HttpClientCallback httpClient</dt>
-        <dd>The callback of the HTTP client to be used to retrieve remote contexts.
+        <dt>LoadContextCallback loadContext</dt>
+        <dd>The callback of the context loader to be used to retrieve remote contexts.
           If specified, it MUST be used to retrieve remote contexts; otherwise, if not specified,
-          the processor's built-in HTTP client MUST be used.</dd>
+          the processor's built-in context loader MUST be used.</dd>
         <dt>object or DOMString expandContext = null</dt>
         <dd>A context that is used to initialize the active context when expanding a document.</dd>
         <dt>boolean optimize = false</dt>