improved get command to not depend on Content-Type headers for differentiating between JSON and HTML/XML