@@ -25,17 +25,17 @@ handle <- function(url, cookies = TRUE) {
25
25
url <- parse_url(http://github.com/%3Cspan%20class=%22pl-smi%22%3Eurl%3C/span%3E)
26
26
cookie_path <- if (cookies ) tempfile() else NULL
27
27
28
- h <- RCurl :: getCurlHandle (cookiefile = cookie_path , .defaults = list () )
28
+ h <- curl :: new_handle (cookiefile = cookie_path )
29
29
structure(list (handle = h , url = url ), class = " handle" )
30
30
}
31
31
32
32
# ' @export
33
33
print.handle <- function (x , ... ) {
34
- cat(" Host: " , build_url(http://github.com/%3Cspan%20class=%22pl-smi%22%3Ex%3C/span%3E%3Cspan%20class=%22pl-k%22%3E$%3C/span%3E%3Cspan%20class=%22pl-smi%22%3Eurl%3C/span%3E) , " <" , ref(x ), " >\n " , sep = " " )
34
+ cat(" Host: " , build_url(http://github.com/%3Cspan%20class=%22pl-smi%22%3Ex%3C/span%3E%3Cspan%20class=%22pl-k%22%3E$%3C/span%3E%3Cspan%20class=%22pl-smi%22%3Eurl%3C/span%3E) , " <" , ref(x $ handle ), " >\n " , sep = " " )
35
35
}
36
36
37
37
ref <- function (x ) {
38
- str_extract(capture.output(print(x $ handle @ ref )) , " 0x[0-9a-f]*" )
38
+ str_extract(capture.output(print(x ))[ 1 ] , " 0x[0-9a-f]*" )
39
39
}
40
40
41
41
is.handle <- function (x ) inherits(x , " handle" )
@@ -44,7 +44,7 @@ reset_handle_config <- function(handle, config) {
44
44
# Calls curl_easy_reset (http://curl.haxx.se/libcurl/c/curl_easy_reset.html)
45
45
# Does not change live connections, session ID cache, DNS cache, cookies
46
46
# or shares.
47
- RCurl :: reset( handle $ handle )
47
+ curl :: handle_reset( handle )
48
48
invisible (TRUE )
49
49
}
50
50
0 commit comments