# Ionic --release App , $http.post not working url https://~~

**URL:** <https://forum.ionicframework.com/t/ionic-release-app-http-post-not-working-url-https/78496>\
**Category:** ionic-v1\
**Created:** [February 6, 2017, 1:23am UTC](https://forum.ionicframework.com/t/ionic-release-app-http-post-not-working-url-https/78496 "2017-02-06T01:23:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ironelder](https://avatars.discourse-cdn.com/v4/letter/i/278dde/32.png) [@ironelder](https://forum.ionicframework.com/u/ironelder)\
**Post date:** [February 6, 2017, 1:23am UTC](https://forum.ionicframework.com/t/ionic-release-app-http-post-not-working-url-https/78496/1 "2017-02-06T01:23:52Z")

</div>

ionic debug mode  
ionic run android  
https:// ~~ url = is working

but

ionic build android --release  
https://~~ url = is not working

My https.post Code  
https.post(‘[https://mytestserver01.com/sessions](https://mytestserver01.com/sessions)’, getLoginData(), loginConfig)  
.then(  
function(response){  
console.log(“success”);  
},  
function(error){  
console.log(“Error !!!”);  
}  
);

My Test Devices : LG-F350S (G-Flex)  
OS : Android 5.0.1

---

<div class="post-metadata">

**Author:** ![ironelder](https://avatars.discourse-cdn.com/v4/letter/i/278dde/32.png) [@ironelder](https://forum.ionicframework.com/u/ironelder)\
**Post date:** [February 6, 2017, 2:12am UTC](https://forum.ionicframework.com/t/ionic-release-app-http-post-not-working-url-https/78496/2 "2017-02-06T02:12:14Z")

</div>

solution  
Ionic Project \> /platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewClient.java

public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error) {

//test - Start  
final AlertDialog.Builder builder = new AlertDialog.Builder(parentEngine.cordova.getActivity());  
builder.setMessage(“Go to an invalid site.”);  
builder.setPositiveButton(“continue”, new DialogInterface.OnClickListener() {  
@Override  
public void onClick(DialogInterface dialog, int which) {  
handler.proceed();  
}  
});  
builder.setNegativeButton(“cancel”, new DialogInterface.OnClickListener() {  
@Override  
public void onClick(DialogInterface dialog, int which) {  
handler.cancel();  
}  
});  
final AlertDialog dialog = builder.create();  
dialog.show();  
//test - End

// final String packageName = parentEngine.cordova.getActivity().getPackageName();  
// final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();  
//  
// ApplicationInfo appInfo;  
// try {  
// appInfo = pm.getApplicationInfo(packageName, PackageManager.GET\_META\_DATA);  
// if ((appInfo.flags & ApplicationInfo.FLAG\_DEBUGGABLE) != 0) {  
// // debug = true  
// handler.proceed();  
// return;  
// } else {  
// // debug = false  
// super.onReceivedSslError(view, handler, error);  
// }  
// } catch (NameNotFoundException e) {  
// // When it doubt, lock it out!  
// super.onReceivedSslError(view, handler, error);  
// }

}
