Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sample illustrating the use of tagtog API and JavaScript</title>
<p>This sample shows how to search using tagtog, the API and JavaScript. You can serve this page from your local server. Check the search results in the console.</p>
<p><button>Click to search</button></p>
function search() {
fetch('', {
method: 'GET',
headers: {'Authorization' : "Basic " + btoa('yourUsername' + ":" + 'yourPassword')},
}).then(response => response.text()).then(text => {
}).catch(function(error) {
console.log('Error: ', error);
var submitBtn = document.querySelector('button');
submitBtn.addEventListener('click', search);