Last active
December 14, 2017 16:35
-
-
Save anytizer/3368b1763619a48b1525efd6ac752414 to your computer and use it in GitHub Desktop.
Angular $http
This file contains hidden or 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
$http({ | |
method: "POST", | |
url: "api/files.php" | |
}).then(function(response) { | |
$scope.files = response.data; | |
}, function(response) { | |
// error | |
}); |
This file contains hidden or 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
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