Module: OpenSearch::API::Http::Actions

Included in:
HttpClient
Defined in:
lib/opensearch/api/namespace/http.rb,
lib/opensearch/api/actions/http/get.rb,
lib/opensearch/api/actions/http/put.rb,
lib/opensearch/api/actions/http/head.rb,
lib/opensearch/api/actions/http/post.rb,
lib/opensearch/api/actions/http/patch.rb,
lib/opensearch/api/actions/http/trace.rb,
lib/opensearch/api/actions/http/delete.rb,
lib/opensearch/api/actions/http/connect.rb,
lib/opensearch/api/actions/http/options.rb,
lib/opensearch/api/actions/http/request.rb

Instance Method Summary collapse

Instance Method Details

#connect(url, headers: {}, body: nil, params: {}) ⇒ Object

Make a customized CONNECT request.

Parameters:

  • arguments (Hash)

    a customizable set of options



22
23
24
# File 'lib/opensearch/api/actions/http/connect.rb', line 22

def connect(url, headers: {}, body: nil, params: {})
  request('CONNECT', url, headers: headers, body: body, params: params)
end

#delete(url, headers: {}, body: nil, params: {}) ⇒ Object

Make a customized DELETE request.

Parameters:

  • arguments (Hash)

    a customizable set of options



22
23
24
# File 'lib/opensearch/api/actions/http/delete.rb', line 22

def delete(url, headers: {}, body: nil, params: {})
  request('DELETE', url, headers: headers, body: body, params: params)
end

#get(url, headers: {}, body: nil, params: {}) ⇒ Object

Make a customized GET request.

Parameters:

  • arguments (Hash)

    a customizable set of options



22
23
24
# File 'lib/opensearch/api/actions/http/get.rb', line 22

def get(url, headers: {}, body: nil, params: {})
  request('GET', url, headers: headers, body: body, params: params)
end

#head(url, headers: {}, body: nil, params: {}) ⇒ Object

Make a customized HEAD request.

Parameters:

  • arguments (Hash)

    a customizable set of options



22
23
24
# File 'lib/opensearch/api/actions/http/head.rb', line 22

def head(url, headers: {}, body: nil, params: {})
  request('HEAD', url, headers: headers, body: body, params: params)
end

#options(url, headers: {}, body: nil, params: {}) ⇒ Object

Make a customized OPTIONS request.

Parameters:

  • arguments (Hash)

    a customizable set of options



22
23
24
# File 'lib/opensearch/api/actions/http/options.rb', line 22

def options(url, headers: {}, body: nil, params: {})
  request('OPTIONS', url, headers: headers, body: body, params: params)
end

#patch(url, headers: {}, body: nil, params: {}) ⇒ Object

Make a customized PATCH request.

Parameters:

  • arguments (Hash)

    a customizable set of options



22
23
24
# File 'lib/opensearch/api/actions/http/patch.rb', line 22

def patch(url, headers: {}, body: nil, params: {})
  request('PATCH', url, headers: headers, body: body, params: params)
end

#post(url, headers: {}, body: nil, params: {}) ⇒ Object

Make a customized POST request.

Parameters:

  • arguments (Hash)

    a customizable set of options



22
23
24
# File 'lib/opensearch/api/actions/http/post.rb', line 22

def post(url, headers: {}, body: nil, params: {})
  request('POST', url, headers: headers, body: body, params: params)
end

#put(url, headers: {}, body: nil, params: {}) ⇒ Object

Make a customized PUT request.

Parameters:

  • arguments (Hash)

    a customizable set of options



22
23
24
# File 'lib/opensearch/api/actions/http/put.rb', line 22

def put(url, headers: {}, body: nil, params: {})
  request('PUT', url, headers: headers, body: body, params: params)
end

#trace(url, headers: {}, body: nil, params: {}) ⇒ Object

Make a customized TRACE request.

Parameters:

  • arguments (Hash)

    a customizable set of options



22
23
24
# File 'lib/opensearch/api/actions/http/trace.rb', line 22

def trace(url, headers: {}, body: nil, params: {})
  request('TRACE', url, headers: headers, body: body, params: params)
end