"can generate all three types of response"
"can send an image raw body in request - w/ appropriate header"
"can send an image raw body in request - w/o appropriate header"

can generate all three types of response

can send an image raw body in request - w/ appropriate header

can send an image raw body in request - w/o appropriate header

test_that("multiple matchers requires all to match", {
list(method = "GET", uri = "http://a.com"),
list(method = "GET", uri = "http://b.com"),
test_that("request_matches has useful logging", {
req1 <- list(uri = "http://example.com", method = "GET")
req2 <- list(uri = "http://example.com/foo", method = "GET")
req3 <- list(uri = "http://example.com", method = "POST")
req4 <- list(uri = "http://example.com/foo", method = "POST")
test_that("informative feedback for components that are absent", {
req2 <- list(uri = "http://example.com?q=1", method = "GET")
test_that("query parameters are normalised", {
test_that("make_comparison extracts expected componets", {
expect_equal(make_comparison("host", req), list(host = "a.com"))
expect_equal(make_comparison("path", req), list(path = "/foo"))
expect_equal(make_comparison("query", req), list(query = list(bar = "baz")))
test_that("default uri extraction ignores port", {
req <- list(method = "GET", uri = "http://x.com:123")
test_that("query params are normalized", {
test_that("query params are filtered", {
req2 <- list(body = '{"foo":     "bar"}')
match_requests_on = c("method", "uri", "body")
# the request body in the cassette is empty
match_requests_on = c("method", "uri", "body_json")
test_that("default matcher includes body_json", {
req1 <- httr2::req_body_json(req, list(foo = "bar"))
req2 <- httr2::req_body_json(req, list(foo = "baz"))
transform = \(x) gsub(hb(), "{httpbin}", x, fixed = TRUE),
test_that("default matcher includes body", {
req1 <- httr2::req_body_form(req, foo = "bar")
req2 <- httr2::req_body_form(req, foo = "baz")
test_that('request matching is not sensitive to escaping special characters', {
aa <- use_cassette('test', res <- crul::HttpClient$new(url)$get())
bb <- use_cassette('test', res <- httr::GET(url))