8000 Binding for URL Params · Issue #846 · gin-gonic/gin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Binding for URL Params #846
Closed
Closed
@miketonks

Description

@miketonks

Is there a way to validate URL params?

e.g.

r.GET("/:foo/*bar", myFunc)

How can I validate foo and bar?

It would be nice if c.Bind() method could fall back (query params, form params, url params) - maybe introducing a 'url' tag:

type MyParams struct {
    Foo string `url:"foo"`
    Bar string `url:"bar`
    Download bool `form:"dl"`
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0