Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

add query string param and path param into header and context#121

Open
caevv wants to merge 1 commit into
awslabs:masterfrom
caevv:master
Open

add query string param and path param into header and context#121
caevv wants to merge 1 commit into
awslabs:masterfrom
caevv:master

Conversation

@caevv

@caevv caevv commented Mar 31, 2022

Copy link
Copy Markdown

Description of changes:

Add API gateway path parameters and query string parameters into the header and context.

More important on this PR is the Path Parameter as this cannot be extracted any other way, happy to remove the query string parameter.

@sapessi

sapessi commented Apr 21, 2022

Copy link
Copy Markdown
Contributor

What's the use-case for getting path parameters this way and not through the framework itself? For example in gin you'd write:

router.GET("/user/:name/*action", func(c *gin.Context) {
        name := c.Param("name")
        action := c.Param("action")
        message := name + " is " + action
        c.String(http.StatusOK, message)
    })```
    

@drakejin

Copy link
Copy Markdown
Contributor

@sapessi Do you think It's not aws-lambda-go-api-proxy's responsibility to directly manipulate path and query parameters?

Therefore, You recommend using well-known HTTP frameworks for manipulating path or query parameters. isn't it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants