Class: Neography::Rest::Extensions
- Inherits:
-
Object
- Object
- Neography::Rest::Extensions
show all
- Includes:
- Helpers
- Defined in:
- lib/neography/rest/extensions.rb
Instance Method Summary
collapse
Methods included from Helpers
#get_id, #json_content_type
Constructor Details
#initialize(connection) ⇒ Extensions
Returns a new instance of Extensions.
6
7
8
|
# File 'lib/neography/rest/extensions.rb', line 6
def initialize(connection)
@connection = connection
end
|
Instance Method Details
#get(path) ⇒ Object
10
11
12
|
# File 'lib/neography/rest/extensions.rb', line 10
def get(path)
@connection.get(path)
end
|
#post(path, body = {}) ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/neography/rest/extensions.rb', line 14
def post(path, body = {})
options = {
:body => body.to_json,
:headers => json_content_type.merge({'Accept' => 'application/json;stream=true'})
}
@connection.post(path, options)
end
|