Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into docusaurus-migration
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/api/app.md
#	docs/api/ctx.md
#	docs/api/middleware/filesystem.md
  • Loading branch information
ReneWerner87 committed Jan 18, 2023
2 parents 68ed66f + 57b46c4 commit 0760292
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
13 changes: 12 additions & 1 deletion docs/api/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ app.Static("/", "./public", fiber.Static{
## Route Handlers
Registeres a route bound to a specific [HTTP method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods).
Registers a route bound to a specific [HTTP method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods).
```go title="Signatures"
// HTTP methods
Expand Down Expand Up @@ -291,6 +291,17 @@ func main() {
}
```
## Server Shutdown
Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waits indefinitely for all connections to return to idle before shutting down.
ShutdownWithTimeout will forcefully close any active connections after the timeout expires.
```go
func (app *App) Shutdown() error
func (app *App) ShutdownWithTimeout(timeout time.Duration) error
```
## HandlersCount
This method returns the amount of registered handlers.
Expand Down
5 changes: 2 additions & 3 deletions docs/api/ctx.md
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ This is useful if you want to pass some **specific** data to the next middleware
:::
```go title="Signature"
func (c *Ctx) Locals(key string, value ...interface{}) interface{}
func (c *Ctx) Locals(key interface{}, value ...interface{}) interface{}
```
```go title="Example"
Expand Down Expand Up @@ -1152,8 +1152,7 @@ app.Get("/teapot", func(c *fiber.Ctx) error {
})
```
{% code title="More examples" %}
```go
```go title="More examples"
app.Get("/", func(c *fiber.Ctx) error {
return c.Redirect("/foo/bar")
return c.Redirect("../login")
Expand Down
3 changes: 3 additions & 0 deletions docs/api/middleware/filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ sidebar_position: 11
:::caution
**`:params` & `:optionals?` within the prefix path are not supported!**
:::
:::caution
**To handle paths with spaces (or other url encoded values) make sure to set `fiber.Config{ UnescapePath: true}`**
:::

### Table of Contents

Expand Down
2 changes: 1 addition & 1 deletion docs/api/middleware/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Then create a Fiber app with `app := fiber.New()`.
// Default middleware config
store := session.New()

// This panic will be catch by the middleware
// This panic will be caught by the middleware
app.Get("/", func(c *fiber.Ctx) error {
// Get session from storage
sess, err := store.Get(c)
Expand Down

0 comments on commit 0760292

Please sign in to comment.