Skip to content

Commit 20f902b

Browse files
committed
[API] Updates inference.update to use PUT
1 parent bdff013 commit 20f902b

File tree

2 files changed

+2
-2
lines changed
  • elasticsearch-api

2 files changed

+2
-2
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/inference/update.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def update(arguments = {})
5050

5151
_task_type = arguments.delete(:task_type)
5252

53-
method = Elasticsearch::API::HTTP_POST
53+
method = Elasticsearch::API::HTTP_PUT
5454
path = if _task_type && _inference_id
5555
"_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_update"
5656
else

elasticsearch-api/spec/elasticsearch/api/actions/inference/update_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
describe 'client#inference.update' do
2121
let(:expected_args) do
2222
[
23-
'POST',
23+
'PUT',
2424
'_inference/foo/bar/_update',
2525
{},
2626
nil,

0 commit comments

Comments
 (0)