fix REST.php - correct the debug logging for non-GET methods

After my last commit non-GET requests miss the parameters in the debug section logging.

This fixes the issue.

As far as I understood - this is BC fix: refs #659