Skip to content

v0.0.6

Choose a tag to compare

@2hmad 2hmad released this 09 Apr 00:51
· 123 commits to master since this release

πŸš€ 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