Created
October 4, 2019 06:37
-
-
Save sumanentc/5ef48c4d8d3905c9cfde87ef3a5109fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//GET API which return the name of the cats specified in QueryParam | |
//http://localhost:8000/cats?name=arnold&type=fluffy | |
func GetCats(c echo.Context) error { | |
catName := c.QueryParam("name") | |
catType := c.QueryParam("type") | |
return c.String(http.StatusOK, fmt.Sprintf("your cat name is : %s\nand cat type is : %s\n", catName, catType)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment