Skip to content

Commit

Permalink
Expose request id
Browse files Browse the repository at this point in the history
  • Loading branch information
iffy authored and dom96 committed Nov 2, 2022
1 parent ef0226a commit 0f7b07f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/httpbeast.nim
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,10 @@ proc ip*(req: Request): string =
## Retrieves the IP address that the request was made from.
req.selector.getData(req.client).ip

proc id*(req: Request): uint =
## Retrieves the ID of the request
req.requestID

proc forget*(req: Request) =
## Unregisters the underlying request's client socket from httpbeast's
## event loop.
Expand Down

0 comments on commit 0f7b07f

Please sign in to comment.