From 9fa8b78e8203162a79783a1e6bf9a27962e02ee8 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 10 Jan 2022 12:28:19 +0700 Subject: all: update share and ciigo modules --- example/example.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'example/example.go') 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{} -- cgit v1.3-5-g9baa