Skip to content

Instantly share code, notes, and snippets.

@mavimo
Last active May 19, 2016 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mavimo/2ae0236e3c1881e2ae1324182a2858b7 to your computer and use it in GitHub Desktop.
Save mavimo/2ae0236e3c1881e2ae1324182a2858b7 to your computer and use it in GitHub Desktop.
esempi-basic-auth
// jQuery
$.ajax({
url: 'https://api.plannify.com/v1/auth/search',
data: {
'txtSearch': 'concerto',
'lat': 45.444101499999995,
'lng': 9.2077104,
'distance': 15
},
type: 'GET',
headers: {
"Authorization" : "Basic Y29kZW1hc3RlcjpkOWdsYzAzbGRHMEE="
},
success: function(data) {
console.log(data);
}
});
// Angular
$http({
method: 'GET',
url: 'https://api.plannify.com/v1/auth/search',
params: {
'txtSearch': 'concerto',
'lat': 45.444101499999995,
'lng': 9.2077104,
'distance': 15
},
headers: {
"Authorization" : "Basic Y29kZW1hc3RlcjpkOWdsYzAzbGRHMEE="
}
}).then(function (data) {
console.log(data);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment