anchor.diff:        <<"close">> ->
            [Pckt|maps:remove(http, State)];
         _           ->
  -         Url       = uri:new(lens:get(url(), State)),
  -         Authority = uri:authority(Url),
  -         [Pckt|maps:remove(http, State#{Authority => Sock})]
  -   end.
  +         Authority = uri:authority( lens:get(uri(), State) ),
  +         [Pckt|State#{Authority => Sock}]
  +   end.
  
positive.code: 
  %%
  %%
  -spec payload(_) -> m(_).
  
  payload(Value) ->
     m_state:put(payload(), Value).
  
  %%%----------------------------------------------------------------------------   
  %%%
  %%% http environment
  %%%
  %%%----------------------------------------------------------------------------
  
  so() ->
     lens:c([ lens:map(http, #{}), lens:map(so, []) ]).
  
  method() ->
     lens:c([ lens:map(http, #{}), lens:map(method, ?NONE) ]).
  
  url() ->
     lens:c([ lens:map(http, #{}), lens:map(url, ?NONE) ]).
  
  header() ->
     lens:c([ lens:map(http, #{}), lens:map(head, []) ]).
  
  header(Head) ->
     lens:c([ lens:map(http, #{}), lens:map(head, []), lens:pair(Head, ?NONE) ]).
  
  payload() ->
     lens:c([ lens:map(http, #{}), lens:map(payload, ?NONE) ]).
  
  %%%----------------------------------------------------------------------------   
  %%%
  
negative.code: %%   IO-monad: http 
  -module(k_http).
  -compile({parse_transform, category}).
  
  -include("knet.hrl").
  -include_lib("datum/include/datum.hrl").
  
  -export([return/1, fail/1, '>>='/2]).
  -export([
     new/1, new/2, 
     x/1, method/1, 
     h/2, header/2, 
     d/1, payload/1, 
     r/0, request/0, request/1
  ]).
  
  -type m(A)    :: fun((_) -> [A|_]).
  -type f(A, B) :: fun((A) -> m(B)).
  