ported to request http lib