Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ type CallOpts struct {
QueryPassthrough bool `json:"queryPassthrough"`
Body string `json:"body"`
ExpectedCode int `json:"expectedCode"`
ContentType string `json:"ContentType"`
}

// HTTPCall performs a basic http call with no options
Expand Down Expand Up @@ -341,7 +342,12 @@ func (h *Helper) HTTPCallRawWithOptsWithContext(ctx context.Context, method, url
if err != nil {
return nil, err
}
req.Header.Add("Content-Type", "application/json")

if len(opts.ContentType) == 0 {
req.Header.Add("Content-Type", "application/json")
} else {
req.Header.Add("Content-Type", opts.ContentType)
}

q := req.URL.Query()
if opts.QueryPassthrough {
Expand Down