diff options
| author | Shulhan <ms@kilabit.info> | 2022-01-10 12:28:19 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-01-10 12:28:19 +0700 |
| commit | 9fa8b78e8203162a79783a1e6bf9a27962e02ee8 (patch) | |
| tree | d21e463e8c77bbb47ad323130d33389b89454e3b /example | |
| parent | bbaa1ddeca854814389944f9d57a95a331f7476f (diff) | |
| download | gorankusu-9fa8b78e8203162a79783a1e6bf9a27962e02ee8.tar.xz | |
all: update share and ciigo modules
Diffstat (limited to 'example')
| -rw-r--r-- | example/example.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/example/example.go b/example/example.go index 3800bfc..7dbf4be 100644 --- a/example/example.go +++ b/example/example.go @@ -399,7 +399,11 @@ func (ex *Example) pathExamplePost(epr *libhttp.EndpointRequest) ([]byte, error) func (ex *Example) runExampleGet(req *trunks.RunRequest) (res *trunks.RunResponse, err error) { if req.Target.HttpClient == nil { - req.Target.HttpClient = libhttp.NewClient(req.Target.BaseUrl, nil, true) + httpcOpts := &libhttp.ClientOptions{ + ServerUrl: req.Target.BaseUrl, + AllowInsecure: true, + } + req.Target.HttpClient = libhttp.NewClient(httpcOpts) } res = &trunks.RunResponse{} @@ -486,7 +490,11 @@ func (ex *Example) attackExampleGet(rr *trunks.RunRequest) vegeta.Targeter { func (ex *Example) runExamplePostForm(req *trunks.RunRequest) (res *trunks.RunResponse, err error) { if req.Target.HttpClient == nil { - req.Target.HttpClient = libhttp.NewClient(req.Target.BaseUrl, nil, true) + httpcOpts := &libhttp.ClientOptions{ + ServerUrl: req.Target.BaseUrl, + AllowInsecure: true, + } + req.Target.HttpClient = libhttp.NewClient(httpcOpts) } res = &trunks.RunResponse{} |
