URLConnection for Console Projects

  1. 4 months ago

    Mike C

    Aug 12 Pre-Release Testers, Xojo Pro North Carolina (USA)
    Edited 4 months ago

    I can get a basic API get with URLConnection and my test Desktop app, but I keep getting an exception error when I try to use URLConnection in a test console app. I can't find anywhere about URLConnection only being for Desktop. Am I missing something?

    Error: -1012
    Msg: The operation couldn’t be completed. (NSURLErrorDomain error -1012.)

    Off the top of my head, I think it’s this:
    https://developer.apple.com/documentation/cfnetwork/cfnetworkerrors/kcfurlerrorusercancelledauthentication?language=objc

    Which would indicate that the URL is requesting authorization but perhaps you haven’t implemented the event?

  2. Greg O

    Aug 12 Xojo Inc Answer scout.galaxy.barn

    Off the top of my head, I think it’s this:
    https://developer.apple.com/documentation/cfnetwork/cfnetworkerrors/kcfurlerrorusercancelledauthentication?language=objc

    Which would indicate that the URL is requesting authorization but perhaps you haven’t implemented the event?

  3. Jean-Yves P

    Aug 12 Pre-Release Testers, Xojo Pro Europe (France, Besançon)

    you may need to install the NSAppTransportSecurity using the info.plist file.
    https://docs.xojo.com/URLConnection

  4. Mike C

    Aug 14 Pre-Release Testers, Xojo Pro North Carolina (USA)

    @Greg OLone Off the top of my head, I think it’s this:
    https://developer.apple.com/documentation/cfnetwork/cfnetworkerrors/kcfurlerrorusercancelledauthentication?language=objc

    Which would indicate that the URL is requesting authorization but perhaps you haven’t implemented the event?

    Greg thank you as you were spot on. I switched over to Chilkat's rest plugin and i was able to get more verbose error messages to help my token auth issue I was having. URLConnection just didn't give me much in the form of error messaging.

    Thanks Greg!

or Sign Up to reply!