View Source ExTypesense.HttpClient (ExTypesense v0.3.5)
Http client for Typesense server.
Link to this section Summary
Link to this section Types
Link to this section Functions
Link to this function
httpc_run(uri, method, payload, content_type \\ 'application/json')
View Source (since 0.1.0)
Link to this function
run(request_method, request_path, body \\ nil, query \\ %{})
View Source (since 0.1.0)@spec run(request_method(), request_path(), request_body(), map()) :: {:ok, map()} | {:error, map()}
Req client.
examples
Examples
iex> HttpClient.run(:get, "/collections")
{:ok,
[%{
"created_at" => 123456789,
"default_sorting_field" => "num_employees",
"fields" => [...],
"name" => "companies",
"num_documents" => 0,
"symbols_to_index" => [],
"token_separators" => []
}]
}