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.
69 70 71 72 73 74 75 76 |
# File 'lib/hoodoo/client/endpoint/endpoints/http.rb', line 69 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.
92 93 94 95 96 97 98 99 |
# File 'lib/hoodoo/client/endpoint/endpoints/http.rb', line 92 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.
48 49 50 51 52 53 54 |
# File 'lib/hoodoo/client/endpoint/endpoints/http.rb', line 48 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 do_http( d ) end |
#show(ident, query_hash = nil) ⇒ Object
See Hoodoo::Client::Endpoint#show.
58 59 60 61 62 63 64 65 |
# File 'lib/hoodoo/client/endpoint/endpoints/http.rb', line 58 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.
80 81 82 83 84 85 86 87 88 |
# File 'lib/hoodoo/client/endpoint/endpoints/http.rb', line 80 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 |