Class: Rad::Http::HttpAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/rad/http/_http_adapter.rb

Instance Method Summary collapse

Instance Method Details

#call(env, workspace = {}, &block) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/rad/http/_http_adapter.rb', line 4

def call env, workspace = {}, &block
  # result, opt = nil, opt.to_openobject
  workspace = conveyors.web.call(
    {env: env, response: Rad::Http::Response.new}.merge(workspace),
    &block
  )

  response = workspace.response.must_be.defined
  result = response.finish

  result
end