Range
An struct containg the type and a slice of ranges will be returned.
- c.Range(int size)
- // Range: bytes=500-700, 700-900
- app.Get("/", func(c *fiber.Ctx) {
- b := c.Range(1000)
- if b.Type == "bytes" {
- for r := range r.Ranges {
- fmt.Println(r)
- // [500, 700]
- }
- }
- })