(args: {
request: Request
parsedResult: HttpRequestParsedResult
resolutionContext?: ResponseResolutionContext
})
| 163 | } |
| 164 | |
| 165 | async predicate(args: { |
| 166 | request: Request |
| 167 | parsedResult: HttpRequestParsedResult |
| 168 | resolutionContext?: ResponseResolutionContext |
| 169 | }) { |
| 170 | const hasMatchingMethod = this.matchMethod(args.request.method) |
| 171 | const hasMatchingUrl = args.parsedResult.match.matches |
| 172 | return hasMatchingMethod && hasMatchingUrl |
| 173 | } |
| 174 | |
| 175 | private matchMethod(actualMethod: string): boolean { |
| 176 | return this.info.method instanceof RegExp |