refactor rest code (#895)

This commit is contained in:
Kevin Wan
2021-08-10 17:59:33 +08:00
committed by GitHub
parent 28a7c9d38f
commit 54d57c7d4b
2 changed files with 8 additions and 6 deletions

View File

@@ -24,7 +24,8 @@ const (
var (
formUnmarshaler = mapping.NewUnmarshaler(formKey, mapping.WithStringValues())
pathUnmarshaler = mapping.NewUnmarshaler(pathKey, mapping.WithStringValues())
headerUnmarshaler = mapping.NewUnmarshaler(headerKey, mapping.WithStringValues(), mapping.WithCanonicalKeyFunc(textproto.CanonicalMIMEHeaderKey))
headerUnmarshaler = mapping.NewUnmarshaler(headerKey, mapping.WithStringValues(),
mapping.WithCanonicalKeyFunc(textproto.CanonicalMIMEHeaderKey))
)
// Parse parses the request.