diff --git a/server/types/matchers.go b/server/types/matchers.go index 620b714..12fcf11 100644 --- a/server/types/matchers.go +++ b/server/types/matchers.go @@ -333,3 +333,19 @@ func (bm *BodyMatcher) UnmarshalYAML(unmarshal func(interface{}) error) error { bm.bodyJson = res return nil } + +func NewJSONBodyMatcher( + bodyJson map[string]StringMatcher, +) *BodyMatcher { + return &BodyMatcher{ + bodyJson: bodyJson, + } +} + +func NewStringBodyMatcher( + bodyString StringMatcher, +) *BodyMatcher { + return &BodyMatcher{ + bodyString: &bodyString, + } +}