Skip to content

Binding for URL Params #846

@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