Generic wrapper function to create an execute a generic HTTP request.