Skip to content

Commit aadeb88

Browse files
committed
Addressing issue commented in #599
Contrary to the documentation the parse_body and private arguments would only be checked for presence, although it is their value that matters.
1 parent 8b5ac00 commit aadeb88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hug/interface.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,10 @@ class HTTP(Interface):
676676
def __init__(self, route, function, catch_exceptions=True):
677677
super().__init__(route, function)
678678
self.catch_exceptions = catch_exceptions
679-
self.parse_body = "parse_body" in route
679+
self.parse_body = route.get("parse_body", True)
680680
self.set_status = route.get("status", False)
681681
self.response_headers = tuple(route.get("response_headers", {}).items())
682-
self.private = "private" in route
682+
self.private = route.get("private", False)
683683
self.inputs = route.get("inputs", {})
684684

685685
if "on_invalid" in route:

0 commit comments

Comments
 (0)