reg/vendor/github.com/grpc-ecosystem/grpc-gateway/examples/browser/index.html
Jess Frazelle 843aebf2c1
update deps
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-07-14 11:48:41 -04:00

23 lines
680 B
HTML

<!DOCTYPE html>
<html>
<head>
<script type="application/javascript" src="bower_components/swagger-js/browser/swagger-client.min.js"></script>
<script type="application/javascript">
window.client = new SwaggerClient({
url: "http://localhost:8080/swagger/echo_service.swagger.json",
success: function() {
client.EchoService.Echo(
{id: "foo"},
{responseContentType: "application/json"},
function(data) {
document.getElementById("echoBack").innerHTML = data.obj.id;
});
}
})
</script>
</head>
<body>
<div id="echoBack"></div>
</body>
</html>