use httprequest wrapper to automatically check for errors