Module: Hyperquest::Request Private

Extended by:
FFI::Library
Defined in:
lib/hyperquest/request.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Dispatcher to Golang

Class Method Summary collapse

Class Method Details

.open(type, uri) ⇒ Array<Response>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Open a type of request via our extension

Parameters:

  • type (Symbol)

    Valid options are get and head

  • uri (Array<String>)

    Uri to be requested

Returns:



22
23
24
25
26
27
# File 'lib/hyperquest/request.rb', line 22

def self.open(type, uri)
  response = public_send(type, Array(uri).to_json)
  JSON.parse(response).each_with_object({}) do |e, hash|
    hash[e["uri"]] = Response.new(e)
  end
end