Schultz9999
Schultz9999

Reputation: 8936

Can Tornado route differently based on Content-Type header?

For the very same REST route, e.g. /message, can I configure routing to execute different handlers based on the value of the Content-Type header?

Upvotes: 1

Views: 115

Answers (1)

Ben Darnell
Ben Darnell

Reputation: 22134

No. Tornado's routing only considers the hostname and path. You'll have to route this path to a single RequestHandler and then inspect the Content-Type inside that handler.

Upvotes: 1

Related Questions