View Source Hui.Http (Hui v0.11.0)

A struct and functions for making Solr HTTP request and response.

Link to this section Summary

Link to this section Types

@type body() :: nil | iodata() | map()
@type client() :: module()
@type endpoint() :: url() | {url(), headers()} | {url(), headers(), options()}
@type headers() :: list()
@type method() :: :get | :post
@type options() :: list()
@type query() :: keyword() | map() | solr_struct() | [solr_struct()]
@type querying_struct() ::
  Hui.Query.Standard.t() | Hui.Query.Common.t() | Hui.Query.DisMax.t()
@type request_url() :: iodata()
@type response() :: {:ok, t()} | {:error, Hui.Error.t()}
@type solr_struct() ::
  querying_struct() | faceting_struct() | highlighting_struct() | misc_struct()
@type t() :: %Hui.Http{
  body: body(),
  client: module(),
  headers: list(),
  method: :get | :post,
  options: keyword(),
  response_parser: module(),
  status: nil | integer(),
  url: request_url()
}

The main request and response data struct.

@type update_query() :: binary() | map() | [map()] | Hui.Query.Update.t()
@type url() :: binary() | atom()

Link to this section Functions

Link to this function

new(atom, endpoint, query, client)

View Source