Class: RestCore::Engine
- Inherits:
-
Object
- Object
- RestCore::Engine
- Includes:
- Middleware
- Defined in:
- lib/rest-core/engine.rb
Direct Known Subclasses
Constant Summary
Constants included from Middleware
Middleware::METHODS_WITH_PAYLOAD, Middleware::UNRESERVED
Constants included from RestCore
ASYNC, CLIENT, DRY, FAIL, HIJACK, LOG, PROMISE, REQUEST_HEADERS, REQUEST_METHOD, REQUEST_PATH, REQUEST_PAYLOAD, REQUEST_QUERY, REQUEST_URI, RESPONSE_BODY, RESPONSE_HEADERS, RESPONSE_KEY, RESPONSE_SOCKET, RESPONSE_STATUS, Simple, TIMER, Universal, VERSION
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Middleware
#contain_binary?, contain_binary?, #error_callback, #escape, escape, #fail, #give_promise, #has_payload?, has_payload?, #id, included, #log, #merge_hash, merge_hash, percent_encode, #percent_encode, #request_uri, request_uri, #run, string_keys, #string_keys
Methods included from RestCore
Class Method Details
.members ⇒ Object
6 |
# File 'lib/rest-core/engine.rb', line 6 def self.members; [:config_engine]; end |
Instance Method Details
#call(env, &k) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/rest-core/engine.rb', line 9 def call env, &k req = env.merge(REQUEST_URI => request_uri(env)) promise = Promise.new(req, k, req[ASYNC]) promise.defer{ request(promise, req) } promise.future_response end |