aboutsummaryrefslogtreecommitdiff
path: root/example/example.go
diff options
context:
space:
mode:
Diffstat (limited to 'example/example.go')
-rw-r--r--example/example.go12
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{}