packed http into thread