diff --git a/lib/neography/rest.rb b/lib/neography/rest.rb index 219ec1e..2b1d414 100644 --- a/lib/neography/rest.rb +++ b/lib/neography/rest.rb @@ -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) diff --git a/lib/neography/rest/extensions.rb b/lib/neography/rest/extensions.rb index ff02e65..4bed2bd 100644 --- a/lib/neography/rest/extensions.rb +++ b/lib/neography/rest/extensions.rb @@ -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)