systran v0.1.0 Systran.Client View Source
Client requests
Link to this section Summary
Functions
Performs a request
Link to this section Functions
Performs a request
Examples
iex> Systran.Client.call(:post, "translation/text/translate", attrs)
{:ok,
%{
"outputs" => [
%{
"output" => "Hola mundo",
"stats" => %{}
}
]
}
}
{:error, :timeout}
{:error,
%{
"error" => %{
"info" => %{"statusCode" => 400},
"message" => "no target provided",
"statusCode" => 400
}
}
}