Update README.md
This commit is contained in:
parent
3feb5578dd
commit
f8d34ac8b6
@ -149,8 +149,8 @@ func main() {
|
|||||||
// Query string parameters are parsed used the existing underlying request object.
|
// Query string parameters are parsed used the existing underlying request object.
|
||||||
// The request responds to a url matching: /search?firstname=Jane&lastname=Doe
|
// The request responds to a url matching: /search?firstname=Jane&lastname=Doe
|
||||||
r.GET("/search", func(c *gin.Context) {
|
r.GET("/search", func(c *gin.Context) {
|
||||||
firstname := c.Request.URL.Query().Get("latitude")
|
firstname := c.Request.URL.Query().Get("firstname")
|
||||||
lastname := c.Request.URL.Quert().Get("longitude")
|
lastname := c.Request.URL.Quert().Get("lastname")
|
||||||
message := "Hello " + firstname + lastname
|
message := "Hello " + firstname + lastname
|
||||||
c.String(http.StatusOK, message)
|
c.String(http.StatusOK, message)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user