| 768 | |
| 769 | private: |
| 770 | static std::string constructBody( |
| 771 | const std::initializer_list<std::string>& allowedMethods, |
| 772 | const Option<std::string>& requestMethod) |
| 773 | { |
| 774 | return |
| 775 | "405 Method Not Allowed. Expecting one of { '" + |
| 776 | strings::join("', '", allowedMethods) + "' }" + |
| 777 | (requestMethod.isSome() |
| 778 | ? ", but received '" + requestMethod.get() + "'" |
| 779 | : "") + |
| 780 | "."; |
| 781 | } |
| 782 | }; |
| 783 | |
| 784 |