Skip to content

Commit

Permalink
feat(agent): Adding graphql trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Aug 27, 2024
1 parent f49c69b commit 961ca80
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions agent/workers/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package workers

import (
"context"
"encoding/json"
"fmt"

"github.com/kubeshop/tracetest/agent/telemetry"
Expand Down Expand Up @@ -232,15 +231,10 @@ func convertProtoHttpTriggerToHttpTrigger(pt *proto.HttpRequest) *trigger.HTTPRe
headers = append(headers, trigger.HTTPHeader{Key: header.Key, Value: header.Value})
}

body, err := json.Marshal(pt.Body)
if err != nil {
return nil
}

return &trigger.HTTPRequest{
Method: trigger.HTTPMethod(pt.Method),
URL: pt.Url,
Body: string(body),
Body: pt.Body,
Headers: headers,
Auth: convertProtoHttpAuthToHttpAuth(pt.Authentication),
SSLVerification: pt.SSLVerification,
Expand Down

0 comments on commit 961ca80

Please sign in to comment.