anchor.diff:          send_external_response(HttpReq, Response)
       end.
   
  +json_req_obj(Req, Db) -> json_req_obj(Req, Db, null).
   json_req_obj(#httpd{mochi_req=Req,
  -               method=Verb,
  +               method=Method,
                  path_parts=Path,
                  req_body=ReqBody
  -            } = HttpReq, Db) ->
  +            } = HttpReq, Db, DocId) ->
       Body = case ReqBody of
           undefined -> Req:recv_body();
           Else -> Else
  
positive.code:     NoCustomer ->
          NoCustomer
      end,
  
      % add headers...
      {[{<<"info">>, {cloudant_util:customer_db_info(HttpReq, Info)}},
          {<<"verb">>, Verb},
          {<<"path">>, FixedPath},
          {<<"query">>, to_json_terms(Req:parse_qs())},
          {<<"headers">>, to_json_terms(Hlist)},
          {<<"body">>, Body},
          {<<"form">>, to_json_terms(ParsedForm)},
          {<<"cookie">>, to_json_terms(Req:parse_cookie())},
          {<<"userCtx">>, couch_util:json_user_ctx(Db)}]}.
  
  to_json_terms(Data) ->
      to_json_terms(Data, []).
  
negative.code: -module(chttpd_external).
  
  -export([handle_external_req/2, handle_external_req/3]).
  -export([send_external_response/2, json_req_obj/2, json_req_obj/3]).
  -export([default_or_content_type/2, parse_external_response/1]).
  
  -import(chttpd,[send_error/4]).
  