27 lines
547 B
Markdown
27 lines
547 B
Markdown
A go package deals with cloudflare clearance by [cf-clearance-scraper](https://github.com/ZFC-Digital/cf-clearance-scraper)
|
|
|
|
# Usage
|
|
|
|
```go
|
|
func TestWAFSession(t *testing.T) {
|
|
session, err := WAFSession("http://localhost:3000/cf-clearance-scraper", "url")
|
|
if err != nil {
|
|
t.Error(err)
|
|
return
|
|
}
|
|
jsonBytes, err := json.Marshal(session)
|
|
if err != nil {
|
|
t.Error(err)
|
|
return
|
|
}
|
|
t.Log(string(jsonBytes))
|
|
|
|
resp, err := RequestWithWAFSession("GET", "url", session, nil)
|
|
if err != nil {
|
|
t.Error(err)
|
|
return
|
|
}
|
|
t.Log(resp.Status)
|
|
}
|
|
```
|