Class: Hoodoo::Client::Endpoint::HTTP
- Inherits:
-
HTTPBased
- Object
- Hoodoo::Client::Endpoint
- HTTPBased
- Hoodoo::Client::Endpoint::HTTP
- Defined in:
- lib/hoodoo/client/endpoint/endpoints/http.rb
Overview
Talk to a resource that is contacted over HTTP or HTTPS.
Configured with a Hoodoo::Services::Discovery::ForHTTP discovery result instance.
Instance Attribute Summary
Attributes inherited from Hoodoo::Client::Endpoint
#interaction, #locale, #resource, #session_id, #version
Instance Method Summary collapse
-
#create(body_hash, query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#create.
-
#delete(ident, query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#delete.
-
#list(query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#list.
-
#show(ident, query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#show.
-
#update(ident, body_hash, query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#update.
Methods inherited from Hoodoo::Client::Endpoint
Constructor Details
This class inherits a constructor from Hoodoo::Client::Endpoint
Instance Method Details
#create(body_hash, query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#create.
70 71 72 73 74 75 76 77 |
# File 'lib/hoodoo/client/endpoint/endpoints/http.rb', line 70 def create( body_hash, query_hash = nil ) d = @description.dup d.action = :create d.body_hash = body_hash d.query_hash = query_hash return do_http( d ) end |
#delete(ident, query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#delete.
93 94 95 96 97 98 99 100 |
# File 'lib/hoodoo/client/endpoint/endpoints/http.rb', line 93 def delete( ident, query_hash = nil ) d = @description.dup d.action = :delete d.ident = ident d.query_hash = query_hash return do_http( d ) end |
#list(query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#list.
49 50 51 52 53 54 55 |
# File 'lib/hoodoo/client/endpoint/endpoints/http.rb', line 49 def list( query_hash = nil ) d = @description.dup # This does NOT dup the objects to which @description points d.action = :list d.query_hash = query_hash return inject_enumeration_state( do_http( d ), query_hash ) end |
#show(ident, query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#show.
59 60 61 62 63 64 65 66 |
# File 'lib/hoodoo/client/endpoint/endpoints/http.rb', line 59 def show( ident, query_hash = nil ) d = @description.dup d.action = :show d.ident = ident d.query_hash = query_hash return do_http( d ) end |
#update(ident, body_hash, query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#update.
81 82 83 84 85 86 87 88 89 |
# File 'lib/hoodoo/client/endpoint/endpoints/http.rb', line 81 def update( ident, body_hash, query_hash = nil ) d = @description.dup d.action = :update d.ident = ident d.body_hash = body_hash d.query_hash = query_hash return do_http( d ) end |