MCPcopy Index your code
hub / github.com/hugapi/hug / set_input_format

Method set_input_format

hug/api.py:141–145  ·  view source on GitHub ↗

Sets an input format handler for this Hug API, given the specified content_type

(self, content_type, handler)

Source from the content-addressed store, hash-verified

139 )
140
141 def set_input_format(self, content_type, handler):
142 """Sets an input format handler for this Hug API, given the specified content_type"""
143 if getattr(self, "_input_format", None) is None:
144 self._input_format = {}
145 self._input_format[content_type] = handler
146
147 @property
148 def middleware(self):

Callers 3

extendMethod · 0.95
test_input_formatFunction · 0.80
decoratorFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_input_formatFunction · 0.64