ccs/README.md
2024-12-02 13:33:44 +08:00

547 B

A go package deals with cloudflare clearance by cf-clearance-scraper

Usage

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)
}