Ignoring Invalid SSL Certificates

Hello… I have an ionic capacitor app without cordova dependency. I have generated the APK file using android studio.When i install the app and try to make API calls it is failing because of invalid SSL certificates. I found this link to Ignore the Invalid SSL Certificates http://ivancevich.me/articles/ignoring-invalid-ssl-certificates-on-cordova-android-ios/ . But the changes suggested in the document should be done in platform folder which will be generated if i include cordova in my project. My question is:
How to ignore the SSL certificate in my ionic-capacitor app which doesnot have any cordova dependency?

Can somebody please tell me how can i fix this issue?

This is a terrible idea. LetsEncrypt offers free SSL certificates, so you don’t have to go any further down this very dangerous road.