MCPcopy Create free account
hub / github.com/aws/smithy-go / parseFormBody

Function parseFormBody

testing/document.go:95–105  ·  view source on GitHub ↗
(bytes []byte)

Source from the content-addressed store, hash-verified

93}
94
95func parseFormBody(bytes []byte) []QueryItem {
96 str := string(bytes)
97 // Strip out any whitespace. Significant whitespace will be encoded, and so
98 // won't be stripped.
99 str = strings.Join(strings.Fields(str), "")
100 parsed := ParseRawQuery(str)
101 sort.SliceStable(parsed, func(i, j int) bool {
102 return parsed[i].Key < parsed[j].Key
103 })
104 return parsed
105}
106
107// AssertURLFormEqual compares two URLForm documents and identifies if the
108// documents contain the same values. Emits a testing error, and returns false

Callers 1

URLFormEqualFunction · 0.85

Calls 1

ParseRawQueryFunction · 0.85

Tested by

no test coverage detected