I have encountered an issue where I am able to successfully send a HTTP request and receive a response, but when I attempt to send the request over HTTPS, I receive the following error message: POST " net::ERR_INSECURE_RESPONSE"
Below is the code snippet in question:
.controller('imageCtrl', function ($scope, $cordovaCamera, $ionicLoading, $http, $ionicPopup, $ionicPopover, $state, userService, $ionicSideMenuDelegate, $rootScope, $cordovaDevice) {
var imageX; //save the base64
$scope.takePhoto = function(){
var options = {
quality: 50,
destinationType: Camera.DestinationType.DATA_URL,
sourceType: Camera.PictureSourceType.CAMERA,
allowEdit: true,
encodingType: Camera.EncodingType.JPEG,
targetWidth: 50,
targetHeight: 50,
popoverOptions: CameraPopoverOptions,
saveToPhotoAlbum: false,
correctOrientation:true
};
$cordovaCamera.getPicture(options).then(function(imageData) {
imageX = imageData;
}, function(err) {
// error
});
};
$scope.uploadPhoto=function(){
var uuid = $cordovaDevice.getUUID();
var dataj ={
image:imageX,
device_id:uuid,
picture_format:"jpg"
};
$http.post('https://..../request/addimage',dataj)
.success(function (data) {
//success
}).
error(function (data, status) {
//error
});
};
})