MCPcopy Create free account
hub / github.com/gavv/httpexpect / checkContentOptions

Method checkContentOptions

response.go:1020–1032  ·  view source on GitHub ↗
(
	opChain *chain, options []ContentOpts, expectedType string, expectedCharset ...string,
)

Source from the content-addressed store, hash-verified

1018}
1019
1020func (r *Response) checkContentOptions(
1021 opChain *chain, options []ContentOpts, expectedType string, expectedCharset ...string,
1022) bool {
1023 if len(options) != 0 {
1024 if options[0].MediaType != "" {
1025 expectedType = options[0].MediaType
1026 }
1027 if options[0].Charset != "" {
1028 expectedCharset = []string{options[0].Charset}
1029 }
1030 }
1031 return r.checkContentType(opChain, expectedType, expectedCharset...)
1032}
1033
1034func (r *Response) checkContentType(
1035 opChain *chain, expectedType string, expectedCharset ...string,

Callers 4

TextMethod · 0.95
getFormMethod · 0.95
getJSONMethod · 0.95
getJSONPMethod · 0.95

Calls 1

checkContentTypeMethod · 0.95

Tested by

no test coverage detected