hash with counter, to store requests, and count each time it is used
See also
Other request-registry:
RequestRegistry
,
request_registry()
Methods
Method get()
Get a request by key
Examples
x <- HashCounter$new()
x$hash
#> list()
z <- RequestSignature$new(method = "get", uri = "https:/httpbin.org/get")
x$put(z)
x$hash
#> $`GET: https:/httpbin.org/get`
#> $`GET: https:/httpbin.org/get`$key
#> [1] "GET: https:/httpbin.org/get"
#>
#> $`GET: https:/httpbin.org/get`$sig
#> <RequestSignature>
#> method: GET
#> uri: https:/httpbin.org/get
#>
#> $`GET: https:/httpbin.org/get`$count
#> [1] 1
#>
#>
x$get(z)
#> [1] 1
x$put(z)
x$get(z)
#> [1] 2