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

Method content_type

hug/interface.py:781–786  ·  view source on GitHub ↗

Returns the content type that should be used by default for this endpoint

(self, request=None, response=None)

Source from the content-addressed store, hash-verified

779 return data
780
781 def content_type(self, request=None, response=None):
782 """Returns the content type that should be used by default for this endpoint"""
783 if callable(self.outputs.content_type):
784 return self.outputs.content_type(request=request, response=response)
785 else:
786 return self.outputs.content_type
787
788 def invalid_content_type(self, request=None, response=None):
789 """Returns the content type that should be used by default on validation errors"""

Callers 4

set_response_defaultsMethod · 0.95
test_content_typeFunction · 0.80
decoratorFunction · 0.80
invalid_content_typeMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_content_typeFunction · 0.64