【发布时间】:2015-07-22 13:38:41
【问题描述】:
我有一个GET 方法,但由于某种原因它发送加密的params
var request = function (apiMethod, apiResponse) {
var deferred = $q.defer();
var apiPath = getApiPath();
apiPath = $rootScope.ROOT_URL + apiPath;
var config = {
method: 'GET',
url: apiPath + apiMethod,
params: 'email=myemail@gmail.com, timestamp_start=1432801800, timestamp_end=1432803600, organizer_email= myemail@gmail.com, cloudinary_rules=scale, meeting_name=123',
//data: apiResponse,
//headers: {'Content-Type': 'application/x-www-form-urlencoded'},
//withCredentials: true,
timeout: canceler.promise
};
$http.get(config).success(function (data) {
$rootScope.showLoader = false;
if (data.message === undefined) {
deferred.resolve(data);
} else {
deferred.reject(data);
}
}).error(function (data, status, headers, config) {
$rootScope.showLoader = false;
deferred.reject(data);
});
return deferred.promise;
};
但是我收到的请求是:
如何发送正确的 GET 请求?
【问题讨论】: