added some http protocol wrapper functions