-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1023 from Badgerati/Issue-993
Add links to WebEvent properties, and property definitions for request/response
- Loading branch information
Showing
2 changed files
with
135 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Endware | ||
|
||
Endware in Pode is like [Middleware](../Middleware/Overview), but it runs after a Route. Endware will also run regardless the state of any prior Middleware or Route logic; if a either throws an error (ie: HTTP 500 or 404), then the Endware will still run. Also, if you have multiple Endwares configured, then each will be invoked inturn, but independently of each other - should one of the Endwares fail, the others will still be invoked. | ||
|
||
Pode has some inbuilt Endware, namely: | ||
|
||
* Any configured [Logging](../Logging/Overview) is invoked as Endware. | ||
* If [Sessions](../Middleware/Types/Sessions) are enabled, then session data is persisted as Endware. | ||
|
||
## Creating Endware | ||
|
||
To add a new Endware script you can use [`Add-PodeEndware`](../../Functions/Utilities/Add-PodeEndware), and supply a `-ScriptBlock`: | ||
|
||
```powershell | ||
Add-PodeEndware -ScriptBlock { | ||
# logic | ||
} | ||
``` | ||
|
||
The scriptblock for Endware also has access to the [WebEvent](../WebEvent) variable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters