[英]Can Tornado route differently based on Content-Type header?
对于完全相同的REST路由,例如/message
,我可以配置路由以根据Content-Type
标头的值执行不同的处理程序吗?
No. Tornado's routing only considers the hostname and path. 否。Tornado的路由仅考虑主机名和路径。 You'll have to route this path to a single
RequestHandler
and then inspect the Content-Type
inside that handler. 您必须将此路径路由到单个
RequestHandler
,然后检查该处理程序中的Content-Type
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.