module Ethon::Curls::Infos

def get_info_string(option, handle)

Returns:
  • (String) - The info.

Parameters:
  • handle (::FFI::Pointer) -- The easy handle.
  • option (Symbol) -- The option name.

Other tags:
    Example: Return info. -
def get_info_string(option, handle)
  string_ptr = ::FFI::MemoryPointer.new(:pointer)
  if easy_getinfo(handle, option, :pointer, string_ptr) == :ok
    ptr=string_ptr.read_pointer
    ptr.null? ? nil : ptr.read_string
  end
end