anchor.diff:  -type body() :: binary().
   -type options() :: http_client:opts().
   -type response() :: {ok, Status :: integer(), ResponseHeaders :: headers(),
  -ResponseBody :: body()} | {error, Reason :: term()}.
  +    ResponseBody :: body()} | {error, Reason :: term()}.
   -type params() :: [{Key :: binary(), Value :: binary()}].
   
   %% Global Registry gr_endpoint:client()
  
positive.code:     AuthHeaders = prepare_auth_headers(Macaroons),
      do_noauth_request(URN, Method, AuthHeaders ++ Headers, Body, Options).
  
  %%%===================================================================
  %%% Internal functions
  %%%===================================================================
  
negative.code: %%--------------------------------------------------------------------
  -spec do_auth_request(URN :: urn(), Method :: method(), Headers :: headers(),
      Body :: body(), Options :: options()) -> response().
  do_auth_request(URN, Method, Headers, Body, Opts) ->
      KeyPath = apply(gr_plugin, get_key_path, []),
      CertPath = apply(gr_plugin, get_cert_path, []),
      SSLOpts = {ssl_options, [{keyfile, KeyPath}, {certfile, CertPath}]},
      % Use a pool of connections (the same for all auth requests)
      % start_pool will just return ok if the pool exists
      ok = hackney_pool:start_pool(auth, [
          {timeout, ?CONNECTION_TIMEOUT}, {max_connections, ?CONNECTION_POOL_SIZE}
      ]),
      do_request(URN, Method, Headers, Body, [SSLOpts, {pool, auth} | Opts]).
  
  
  %%--------------------------------------------------------------------
  