add support for routing by content-type
Apikit-290:
- Adding more tests cases
- Some small refactors
Merge branch 'content-type-routing' into apikit-290