View Source OmniCaptcha.Http (Omni Captcha v0.0.2)

Responsible for managing HTTP requests to the captcha APIs

Summary

Functions

Sends an HTTP request to the specified adapters verify url.

Functions

Link to this function

request_verification(body, options \\ [])

View Source
@spec request_verification(binary(), [{:timeout, integer()}]) ::
  {:ok, map()} | {:error, [atom()]}

Sends an HTTP request to the specified adapters verify url.

Options

  • :adapter - sets the adapter to use if using multiple captacha providers in the same project
  • :timeout - the timeout for the request (defaults to 5000ms)

Example

{:ok, %{

"success" => success,
"challenge_ts" => ts,
"hostname" => host,
"error-codes" => errors

}} = OmniCaptcha.Http.request_verification(%{

secret: "secret",
response: "response",
remoteip: "remoteip"

})