Skip to content

Commit

Permalink
comment out fxns in response_class file that seem to not be used anyw…
Browse files Browse the repository at this point in the history
…here
  • Loading branch information
sckott committed Oct 18, 2018
1 parent e7adf1a commit c10c47e
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions R/response_class.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,45 +211,45 @@ extract_http_version <- function(x) {
}


vcr_request_httr <- function(x) {
Request$new(
x$request$method,
x$url,
x$body, # FIXME: body not a field, probably index to x$request$fields
as.list(x$request$headers),
self$cassette_opts
)
}

vcr_request_crul <- function(x) {
Request$new(
x$request$method,
x$url,
x$body,
x$request_headers,
self$cassette_opts
)
}



vcr_response_httr <- function(x) {
VcrResponse$new(
httr::http_status(x),
x$headers,
httr::content(x, encoding = "UTF-8"),
x$all_headers[[1]]$version,
super$cassette$cassette_opts
)
}

vcr_response_crul <- function(x) {
VcrResponse$new(
x$status_http(),
headers = x$response_headers,
body = rawToChar(x$content),
http_version = x$response_headers$status,
self$cassette_opts
)
}
# vcr_request_httr <- function(x) {
# Request$new(
# x$request$method,
# x$url,
# x$body, # FIXME: body not a field, probably index to x$request$fields
# as.list(x$request$headers),
# self$cassette_opts
# )
# }

# vcr_request_crul <- function(x) {
# Request$new(
# x$request$method,
# x$url,
# x$body,
# x$request_headers,
# self$cassette_opts
# )
# }



# vcr_response_httr <- function(x) {
# VcrResponse$new(
# httr::http_status(x),
# x$headers,
# httr::content(x, encoding = "UTF-8"),
# x$all_headers[[1]]$version,
# super$cassette$cassette_opts
# )
# }

# vcr_response_crul <- function(x) {
# VcrResponse$new(
# x$status_http(),
# headers = x$response_headers,
# body = rawToChar(x$content),
# http_version = x$response_headers$status,
# self$cassette_opts
# )
# }

0 comments on commit c10c47e

Please sign in to comment.