Factorize code in two parts (native/old handle of HTTP and Cohttp handle of HTTP)