(method)
| 600 | } |
| 601 | |
| 602 | function normalizeAndValidateMethod (method) { |
| 603 | if (typeof method !== 'string') { |
| 604 | throw new FST_ERR_ROUTE_METHOD_INVALID() |
| 605 | } |
| 606 | method = method.toUpperCase() |
| 607 | if (!this[kSupportedHTTPMethods].bodyless.has(method) && |
| 608 | !this[kSupportedHTTPMethods].bodywith.has(method)) { |
| 609 | throw new FST_ERR_ROUTE_METHOD_NOT_SUPPORTED(method) |
| 610 | } |
| 611 | |
| 612 | return method |
| 613 | } |
| 614 | |
| 615 | function validateSchemaBodyOption (method, path, schema) { |
| 616 | if (this[kSupportedHTTPMethods].bodyless.has(method) && schema?.body) { |
nothing calls this directly
no outgoing calls
no test coverage detected