Update request.rs

fix error of using deprecated function