Return

Custom endpoint that returns an xml
CAN REST API return XML?How do I return a response in XML?Is XML better than JSON?Should REST API always return JSON?How do I return XML instead of JS...
Return instead of echo
You only use echo when you want to print something onto the screen or within the markup i.e text on the screen, path to an image or title on the top o...