Skip to content

Commit

Permalink
Addressing issue commented in #599
Browse files Browse the repository at this point in the history
Contrary to the documentation the parse_body and private arguments would
only be checked for presence, although it is their value that matters.
  • Loading branch information
exoosh committed Dec 16, 2022
1 parent 8b5ac00 commit aadeb88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hug/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,10 +676,10 @@ class HTTP(Interface):
def __init__(self, route, function, catch_exceptions=True):
super().__init__(route, function)
self.catch_exceptions = catch_exceptions
self.parse_body = "parse_body" in route
self.parse_body = route.get("parse_body", True)
self.set_status = route.get("status", False)
self.response_headers = tuple(route.get("response_headers", {}).items())
self.private = "private" in route
self.private = route.get("private", False)
self.inputs = route.get("inputs", {})

if "on_invalid" in route:
Expand Down

0 comments on commit aadeb88

Please sign in to comment.