elasticsearch v1.0.0 Elasticsearch.API behaviour View Source

Behaviour for interacting with the Elasticsearch JSON API.

Link to this section Summary

Types

A payload of data to send, relevant to :put and :post requests

An HTTP method

A keyword list of options to pass to HTTPoison/Hackney

The URL to request from the API

Callbacks

Makes a request to an Elasticsearch JSON API URl using the given method

Link to this section Types

A payload of data to send, relevant to :put and :post requests

Link to this type method() View Source
method() :: :get | :put | :post | :delete

An HTTP method

A keyword list of options to pass to HTTPoison/Hackney

The URL to request from the API

Link to this section Callbacks

Link to this callback request(config, method, url, data, opts) View Source
request(
  config :: Elasticsearch.Cluster.config(),
  method(),
  url(),
  data(),
  opts()
) :: response()

Makes a request to an Elasticsearch JSON API URl using the given method.