function fetchJSON(docPath) {
  return fetch(docPath, { headers: { Accept: ACCEPT_HEADER_VALUE_FOR_DOCUMENTS }, loadSpec: true })
    .then((res) => res.text())
    .then((text) => jsYaml.load(text));
}
Fetches a document.
@param  {String} docPath the absolute URL of the document.
@return {Promise}        a promise of the document content.
@api public