Class Curl::Easy
In: lib/curb.rb
Parent: Object

Methods

cert=   download  

External Aliases

cert= -> native_cert=
  Allow the incoming cert string to be file:password but be careful to not use a colon from a windows file path as the split point. Mimic what curl‘s main does

Public Class methods

Stream the specified url (via perform) and save the data directly to the supplied filename (defaults to the last component of the URL path, which will usually be the filename most simple urls).

If a block is supplied, it will be passed the curl instance prior to the perform call.

Note that the semantics of the on_body handler are subtly changed when using download, to account for the automatic routing of data to the specified file: The data string is passed to the handler before it is written to the file, allowing the handler to perform mutative operations where necessary. As usual, the transfer will be aborted if the on_body handler returns a size that differs from the data chunk size - in this case, the offending chunk will not be written to the file, the file will be closed, and a Curl::Err::AbortedByCallbackError will be raised.

Public Instance methods

[Validate]