docs: function fetchAllJSONPages(address) {
      return get(address, 'application/json').then(res => {
          return streamToText(res).then(JSON.parse).then(json => {
              // Extract next page link if it's there.
              if (res.headers['link']) {
                  const m = res.headers['link'].match(/<(https:\/\/.+)>;\s*rel=["']next["']/);
                  if (!m || m.length <= 1) {
                      // This page is final.
                      return json;
                  }
                  // Have one more page, fetch it.
                  return fetchAllJSONPages(m[1]).then(r => json.concat(r));
              } else {
                  return json;
              }
          });
      });
  }