Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Commit

Permalink
Expose KintoClient() (fixes #77) (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem authored Jun 17, 2016
1 parent 40ce61a commit 9d6d917
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
23 changes: 23 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<title>Kinto HTTP client demo</title>
<script type="text/javascript" src="kinto-http.noshim.js"></script>
</head>
<body>
<input id="server" placeholder="https://kinto.server/v1" value="https://kinto-ota.dev.mozaws.net/v1"/>
<button id="go">Go!</button>
<pre id="capabilities"></pre>

<script type="text/javascript">
document.getElementById("go").onclick = () => {
const server = document.getElementById("server").value;
const client = new KintoClient(server);
client.fetchServerInfo()
.then((res) => {
document.getElementById("capabilities").innerText = JSON.stringify(res, null, 2);
});
};
</script>
</body>
</html>
Loading

0 comments on commit 9d6d917

Please sign in to comment.