Created
October 4, 2019 08:58
-
-
Save sumanentc/250437eda8d6f86355b8823047eb15df 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
package main | |
import ( | |
"github.com/labstack/echo" | |
"fmt" | |
"net/http" | |
) | |
func main() { | |
// create a new echo instance | |
e := echo.New() | |
//QueryParam along with PathVariable Get API | |
e.GET("/cats/:data",GetCats) | |
//Post Request | |
e.POST("/cats", AddCat) | |
e.Logger.Fatal(e.Start(":8000")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment