Hi,
I'm building a rest api with Phalcon in a micro module. I want to get the accept header of the request to return an XML format if the accept header is a application/xml
or if the accept header is a application/json
then I'll return a json format. I seen in the documentation this method $request->getAcceptableContent();
but I don't know how to get the string application/xml
or application/json
with this method.
Could you help me ?
Thanks.