use more httr native tools instead of hodegpodge