Releases: gopulse/pulse
Releases · gopulse/pulse
v0.4.1
v0.4.0
🚀 New
- Add
Query
method in context to get queries from the request - Add
JSON
method in context to pass JSON object in request - Split the
SetHeader
method toSetResponseHeader
andSetRequestHeader
- Split the
GetHeader
method toGetResponseHeader
andGetRequestHeader
- Add the
SetContentType
method in context to definecontent-type
in the request - Add the
Accepts
method to check if the specified content types are acceptable
🧹 Updates
- Use header helpers methods in context
v0.3.1
v0.3.0
v0.2.2
v0.2.1
v0.2.0
v0.1.1
v0.1.0
🚀 New
- Support Wildcard route
router.Get("/users/*", func(ctx *Context) error {
ctx.String("hello")
return nil
})
- Support Static Rotues
router.Get("/", func(ctx *Context) error {
ctx.SetHeader("test-header", "test header value")
fmt.Println(ctx.GetHeader("test-header"))
return nil
})
🧹 Updates
- Change
ctx
in context struct toRequestCtx
v0.0.6
🚀 New
- Support Cookies
router.Get("/", func(ctx *Context) error {
cookie := Cookie{
Name: "test-cookie-1",
Value: "Test Cookie 1",
Path: "/",
Domain: "localhost",
MaxAge: 0,
Expires: time.Now().Add(24 * time.Hour),
Secure: false,
HTTPOnly: false,
SameSite: "Lax",
SessionOnly: false,
}
ctx.SetCookie(&cookie)
// Get Cookie
ctx.GetCookie("test-cookie-1")
return nil
})
- Support Set / Get Headers
router.Get("/", func(ctx *Context) error {
ctx.SetHeader("test-header", "test header value")
fmt.Println(ctx.GetHeader("test-header"))
return nil
})
- Implement utils in package