Hamza Ahmad

    Hamza Ahmad

    11 months ago
    Hello everyone, i'm working in KMM and use ktor library for 'http calls' , but when called server request I got exception and it says "Exception in http request: Error Domain = NSURlErrorDomain Code = -1202 'The certificate for this server is invalid.'" and ktor only calls request that have url with https is there any solution to call server request with simple http instead of https?
    John O'Reilly

    John O'Reilly

    11 months ago
    "ktor only calls request that have url with https" Ktor can make requests to http endpoints. What you may need to do though is configure your iOS/Android projects (if that's what you're using) to allow such requests....but that's a general requirement, independent of use of Ktor.
    for example on Android you may need to have following in your
    AndroidManfiest.xml
    android:usesCleartextTraffic="true"
    Hamza Ahmad

    Hamza Ahmad

    11 months ago
    and for ios what should we write?