EVOLUTION-MANAGER
Edit File: write_stream.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Process output in a streaming manner.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for write_stream {httr}"><tr><td>write_stream {httr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Process output in a streaming manner.</h2> <h3>Description</h3> <p>This is the most general way of processing the response from the server - you receive the raw bytes as they come in, and you can do whatever you want with them. </p> <h3>Usage</h3> <pre> write_stream(f) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>f</code></td> <td> <p>Callback function. It should have a single argument, a raw vector containing the bytes recieved from the server. This will usually be 16k or less. The return value of the function is ignored.</p> </td></tr> </table> <h3>Examples</h3> <pre> GET( "https://github.com/jeroen/data/raw/gh-pages/diamonds.json", write_stream(function(x) { print(length(x)) length(x) }) ) </pre> <hr /><div style="text-align: center;">[Package <em>httr</em> version 1.4.2 <a href="00Index.html">Index</a>]</div> </body></html>