Skip to content

Commit

Permalink
fix #246 add notes about async ability
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jul 19, 2024
1 parent a4d985c commit 6c78b83
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
6 changes: 6 additions & 0 deletions R/vcr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
#' @section Request matching:
#' See [request-matching] for help on the many request matching options.
#'
#' @section Async:
#' As of \pkg{crul} v1.5, `vcr` will work for async http requests with
#' \pkg{crul}. \pkg{httr} does not do async requests, and \pkg{httr2}
#' async plumbing does not have any hooks for mocking via \pkg{webmockr}
#' or recording real requests via this package
#'
#' @keywords internal
"_PACKAGE"

Expand Down
3 changes: 2 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ install.packages("vcr")
Development version:

```{r eval=FALSE}
remotes::install_github("ropensci/vcr")
# install.packages("pak")
pak::pak("ropensci/vcr")
```

```{r}
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,20 @@ Now your tests can work without any internet connection!
CRAN version:


```r
``` r
install.packages("vcr")
```

Development version:


```r
remotes::install_github("ropensci/vcr")
``` r
# install.packages("pak")
pak::pak("ropensci/vcr")
```


```r
``` r
library("vcr")
library("crul")
```
Expand Down Expand Up @@ -224,7 +225,7 @@ If you want to get a feel for how vcr works, although you don't need too.



```r
``` r
library(vcr)
library(crul)

Expand All @@ -239,7 +240,7 @@ system.time(
The request gets recorded, and all subsequent requests of the same form used the cached HTTP response, and so are much faster


```r
``` r
system.time(
use_cassette(name = "helloworld", {
cli$get("get")
Expand Down Expand Up @@ -385,7 +386,7 @@ vcr_configure()
Calling `vcr_configuration()` gives you some of the more important configuration parameters in a nice tidy print out


```r
``` r
vcr_configuration()
#> <vcr configuration>
#> Cassette Dir: .
Expand Down Expand Up @@ -432,7 +433,7 @@ You can set your own options by tweaking the `match_requests_on` parameter:



```r
``` r
use_cassette(name = "one", {
cli$post("post", body = list(a = 5))
},
Expand Down
12 changes: 11 additions & 1 deletion man/vcr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6c78b83

Please sign in to comment.