This repository has been archived on 2021-02-22. You can view files and clone it, but cannot push or open issues or pull requests.
hcaptcha/example_test.go
John Olheiser a3520ee4fa
Initial Commit
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-08-24 15:50:09 -05:00

23 lines
437 B
Go

package hcaptcha
import "fmt"
func ExampleClient_Verify() {
// Dummy secret https://docs.hcaptcha.com/#integrationtest
client, err := New(dummySecret)
if err != nil {
panic(err)
}
// Dummy token https://docs.hcaptcha.com/#integrationtest
resp, err := client.Verify(dummyToken, PostOptions{})
if err != nil {
panic(err)
}
if resp.Success {
fmt.Println("Verification succeeded")
// Output: Verification succeeded
}
}