File: index.html

package info (click to toggle)
golang-github-grpc-ecosystem-grpc-gateway 2.20.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,236 kB
  • sloc: javascript: 357; makefile: 147; sh: 26
file content (22 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!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/openapiv2/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>