View Source SurrealEx.Config (SurrealEx v0.2.0)
Link to this section Summary
Functions
Prepare connection configuration for HTTP with Basic Authorization
Link to this section Functions
Prepare connection configuration for HTTP with Basic Authorization
examples
Examples
iex> config = SurrealEx.Config.for_http("http://localhost:8000","testns","testdb","root","root")
iex> config.kind
:for_http
iex> config.uri
"http://localhost:8000"
iex> config.ns
"testns"
iex> config.db
"testdb"
iex> config = SurrealEx.Config.for_http("http://localhost:8000","testns","testdb","root","root")
iex> config._prepare
%{
headers: [
"NS": "testns",
"DB": "testdb",
"Authorization": "Basic cm9vdDpyb290",
"Accept": "application/json"
]
}