Skip to content

Commit

Permalink
Deploying to gh-pages from @ 1f6f465 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Feb 2, 2024
1 parent 26ae3e0 commit d7a6937
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Binary file modified main.epub
Binary file not shown.
Binary file modified main.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion search.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions vcr-usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h2>
<span> write_disk_path <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/file.path.html">file.path</a></span><span class="op">(</span><span class="va">tmpdir</span>, <span class="st">"files"</span><span class="op">)</span></span>
<span><span class="op">)</span></span></code></pre></div>
<pre><code>#&gt; &lt;vcr configuration&gt;
#&gt; Cassette Dir: /tmp/RtmpkjWAoH/fixtures
#&gt; Cassette Dir: /tmp/RtmporE3ZE/fixtures
#&gt; Record: once
#&gt; Serialize with: yaml
#&gt; URI Parser: crul::url_parse
Expand All @@ -122,7 +122,7 @@ <h2>
#&gt; Logging?: FALSE
#&gt; ignored hosts:
#&gt; ignore localhost?: FALSE
#&gt; Write disk path: /tmp/RtmpkjWAoH/files</code></pre>
#&gt; Write disk path: /tmp/RtmporE3ZE/files</code></pre>
<p>Then pass a file path (that doesn’t exist yet) to crul’s <code>disk</code> parameter.
<code>vcr</code> will take care of handling writing the response to that file in
addition to the cassette.</p>
Expand All @@ -138,7 +138,7 @@ <h2>
<pre><code>#&gt; [1] TRUE</code></pre>
<div class="sourceCode" id="cb105"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">out</span><span class="op">$</span><span class="fu">parse</span><span class="op">(</span><span class="op">)</span></span></code></pre></div>
<pre><code>#&gt; [1] "{\n \"args\": {}, \n \"headers\": {\n \"Accept\": \"application/json, text/xml, application/xml, */*\", \n \"Accept-Encoding\": \"gzip, deflate\", \n \"Host\": \"httpbin.org\", \n \"User-Agent\": \"libcurl/7.81.0 r-curl/5.2.0 crul/1.4.0\", \n \"X-Amzn-Trace-Id\": \"Root=1-65bcac2a-37e7261f0e8c2eae43b40727\"\n }, \n \"origin\": \"20.55.213.86\", \n \"url\": \"https://httpbin.org/get\"\n}\n"</code></pre>
<pre><code>#&gt; [1] "{\n \"args\": {}, \n \"headers\": {\n \"Accept\": \"application/json, text/xml, application/xml, */*\", \n \"Accept-Encoding\": \"gzip, deflate\", \n \"Host\": \"httpbin.org\", \n \"User-Agent\": \"libcurl/7.81.0 r-curl/5.2.0 crul/1.4.0\", \n \"X-Amzn-Trace-Id\": \"Root=1-65bcaca2-7a50cb5878c03def0bb9e5dd\"\n }, \n \"origin\": \"13.90.131.63\", \n \"url\": \"https://httpbin.org/get\"\n}\n"</code></pre>
<p>This also works with <code>httr</code>. The only difference is that you write to disk
with a function <code>httr::write_disk(path)</code> rather than a parameter.</p>
<p>Note that when you write to disk when using <code>vcr</code>, the cassette is slightly
Expand Down

0 comments on commit d7a6937

Please sign in to comment.