I feel that this is a very easy question but I can't find anything on the web nor in the httr docs.
Basically, I have a GET call that request info from an API. Sometimes I might request the same information, i.e. the same query parameters but after another request.
my_GET <- function(url) {
GET(url = url) # extra args here
}
create_path <- function(path) {
complete_url <- modify_url(url = "whatever", path)
my_GET(complete_url)
}
create_path("path_one")
create_path("path_two")
create_path("path_one")
Is there a way for the third request to just retrieve the results from the first request? I think I can work out a "manual" version such as saving the results in a tempdir and checking manually but I think this might be taken care of by the httr package. Any ideas?