Write

Write adopts the Writer interface

  1. func (c *Ctx) Write(p []byte) (n int, err error)
  1. app.Get("/", func(c *fiber.Ctx) error {
  2. c.Write([]byte("Hello, World!")) // => "Hello, World!"
  3. fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
  4. })