PerBonomi
9 years agoBoss
Simple API call XML viewer
Since, with the latest update, it became impossible to simply throw a API v1 call into the address bar and see the raw xml, I put this together.
Ugly, but functional.
<div id="api"><span>API Call: (/restapi/vc/)</span><input type="text" id="q"/><input type="button" id="s" value="Submit"/></div> <div id="view"><textarea id="r"></textarea></div> <script> $("#s").click(function() { var vCall = '/restapi/vc/' + $("#q").val(); $.ajax(vCall, { dataType:'xml', data:{}, type:'GET', success:function(data, status, response) { var tmp=response.responseText; $('#r').val(tmp);} }); }); </script>
Example: