Skip to content

Instantly share code, notes, and snippets.

@anytizer
Last active December 14, 2017 16:35
Show Gist options
  • Save anytizer/3368b1763619a48b1525efd6ac752414 to your computer and use it in GitHub Desktop.
Save anytizer/3368b1763619a48b1525efd6ac752414 to your computer and use it in GitHub Desktop.
Angular $http
$http({
method: "POST",
url: "api/files.php"
}).then(function(response) {
$scope.files = response.data;
}, function(response) {
// error
});
return $http({
method: "POST",
url: url,
data: dataJSON,
headers: {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"X-Protection-Token": "",
"SUID": "",
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment