Separate request related functions into a new file.