Module Ethon::Easy::Callbacks
In: lib/ethon/easy/callbacks.rb

This module contains all the logic around the callbacks, which are needed to interact with libcurl.

@api private

Methods

Public Class methods

Public Instance methods

Returns the body write callback.

@example Return the callback.

  easy.body_write_callback

@return [ Proc ] The callback.

Returns the debug callback. This callback is currently used write the raw http request headers.

@example Return the callback.

  easy.body_write_callback

@return [ Proc ] The callback.

Returns the header write callback.

@example Return the callback.

  easy.header_write_callback

@return [ Proc ] The callback.

Returns the progress callback.

@example Return the callback.

  easy.progress_callback

@return [ Proc ] The callback.

Returns the body read callback.

@example Return the callback.

  easy.read_callback

@return [ Proc ] The callback.

Set writefunction and headerfunction callback. They are called by libcurl in order to provide the header and the body from the request.

@example Set callbacks.

  easy.set_callbacks

Set the read callback. This callback is used by libcurl to read data when performing a PUT request.

@example Set the callback.

  easy.set_read_callback("a=1")

@param [ String ] body The body.

[Validate]