Added option to pass in http.Request