MCPcopy Create free account
hub / github.com/code-scan/Goal / TestCookie

Function TestCookie

tests/cookie_test.go:10–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestCookie(t *testing.T) {
11 var http = Ghttp.Http{}
12 http.Session()
13 http.New("GET", "https://www.ti.com")
14 http.SetProxy("http://127.0.0.1:8080")
15 http.SetCookie("a=1")
16 http.Execute()
17 log.Println(http.HttpClient.Jar)
18
19 http.New("GET", "https://www.ti.com")
20 http.SetCookie("a=1234")
21 http.Execute()
22 log.Println(http.HttpClient.Jar)
23
24 http.New("GET", "https://www.ti.com")
25 http.SetCookie("abb=1")
26 http.Execute()
27 log.Println(http.HttpClient.Jar)
28
29 http.New("GET", "https://www.ti.com")
30 http.SetCookie("cca=ccc1")
31 http.Execute()
32 log.Println(http.HttpClient.Jar)
33
34}

Callers

nothing calls this directly

Calls 5

SessionMethod · 0.80
NewMethod · 0.80
SetProxyMethod · 0.80
SetCookieMethod · 0.80
ExecuteMethod · 0.80

Tested by

no test coverage detected