Last active
May 19, 2016 09:36
-
-
Save mavimo/2ae0236e3c1881e2ae1324182a2858b7 to your computer and use it in GitHub Desktop.
esempi-basic-auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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