$.ajax({
type: 'GET',
url: 'url',
dataType: 'json',
//whatever you need
beforeSend: function (xhr) {
xhr.setRequestHeader('Authorization', make_base_auth(user, password));
},
success: function () {});
});
function make_base_auth(user, password) {
var tok = user + ':' + password;
var hash = btoa(tok);
return 'Basic ' + hash;
}
javascript
<iframe width="100%" height="470" src="http://snipet.teknotit.com/index.php?embed=5bdf788df1935" type="text/html"></iframe>
Texte seul - Permalink - Snippet public posté le 04/11/2018