helper functions to facilitate the use with net/http