I am using laminas-mvc, when requesting /appliation/index/demo with Content-Type: application/json, then I response with json format, when xml then response xml format, if not specially set the content-type, when It will response a html format.
I am wondering how to fulfil this condition. Or where is the best place to hook the logic.
I don’t know if anyone have done this before. any advises?