Skip to content

Commit

Permalink
feat: add getMethod method to Request class
Browse files Browse the repository at this point in the history
  • Loading branch information
matej-marcisovsky authored and mjancarik committed Oct 2, 2024
1 parent 864bfe2 commit 7453e05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-glasses-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ima/core": patch
---

feat: add `getMethod` method to `Request` class
4 changes: 4 additions & 0 deletions packages/core/src/router/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,9 @@ export class Request {
getIPs(): string[] {
return this._request ? this._request.ips || [] : [];
}

getMethod() {
return this._request ? this._request.method : '';
}
}
// @endif

0 comments on commit 7453e05

Please sign in to comment.