Skip to content

Commit 2f20100

Browse files
authored
create_response() already sets the last response (#736)
1 parent da2724a commit 2f20100

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

R/req-perform-connection.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,7 @@ req_perform_connection1 <- function(req, handle, blocking = TRUE) {
140140
}
141141

142142
curl_data <- curl::handle_data(handle)
143-
144-
the$last_response <- create_response(req, curl_data, body)
145-
the$last_response
143+
create_response(req, curl_data, body)
146144
}
147145

148146
# Make open mockable

R/req-perform.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ req_perform1 <- function(req, path = NULL, handle = NULL) {
190190
curl::handle_setopt(handle, cookielist = "FLUSH")
191191
curl::handle_setopt(handle, cookiefile = NULL, cookiejar = NULL)
192192

193-
the$last_response <- create_response(req, fetch$curl_data, fetch$body)
194-
the$last_response
193+
create_response(req, fetch$curl_data, fetch$body)
195194
}
196195

197196
curl_fetch <- function(handle, url, path) {

0 commit comments

Comments
 (0)