draft function for http requests