Skip to content

Commit

Permalink
allow headers to be past in when using extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdemarzi committed Jan 31, 2014
1 parent 43b64d3 commit cb21b01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/neography/rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ def execute_script(script, params = {})

# unmanaged extensions

def post_extension(path, params = {})
@extensions.post(path, params)
def post_extension(path, params = {}, headers = nil)
@extensions.post(path, params, headers)
end

def get_extension(path)
Expand Down
4 changes: 2 additions & 2 deletions lib/neography/rest/extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ def get(path)
@connection.get(path)
end

def post(path, body = {})
def post(path, body = {}, headers = nil)
options = {
:body => body.to_json,
:headers => json_content_type.merge({'Accept' => 'application/json;stream=true'})
:headers => headers || json_content_type.merge({'Accept' => 'application/json;stream=true'})
}

@connection.post(path, options)
Expand Down

0 comments on commit cb21b01

Please sign in to comment.