Hot Door CORE Forum

Full Version: Internet GET fails under AI 20
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For some reason, internet GET works with AI 16-19, but fails under AI 20. POST works, however, which is much more important. Is there something different we should do, or is it a bug? Thanks -- Rick
The underlying code is identical for all versions of Illustrator, and we use both GET and POST for all of our plugins (which are compatible with AI 20) with no trouble.

Can you post sample code that exhibits the problem? I know that might be difficult in this case due to the server side component, but if there is truly a problem with our code then the server shouldn't matter much (obviously there is likely to exist some strange/rare HTTP server implementation out there, but again our code is the same for all versions and utilizes OS networking calls under the hood - so other stuff on your system would be likely to fail accessing that same server).
Hi Garrett, here's the code I use, which is pretty close to the sample code you provided earlier. It simply sends a string and receives the plugin's current version number:

In the .h file:

Code:
hdi::core::InternetGET* iGET;

In the .cpp file:

Code:
std::string GETtxt = "http://someurl.com/breakingbad.php?prdID=P12r";
this->iGET = hdi::core::InternetGET::Async(GETtxt,HDI_CORE_CALLBACK(theReg, this, _checkVersionOKCB), HDI_CORE_CALLBACK(theReg, this, _checkVersionFailCB));
    if(this->iGET)
    {
        this->iGET->run();
    }

The fail callback is correctly called. TIA for any suggestions.
From within your failure callback you can call the InternetGET::error() method to find out more regarding the error condition. Keep in mind that any variety of issues along the networking stack can arise, like a poor connection, server being down, server generating an HTTP error, invalid HTTPS certificate, outbound firewall blocking the connection, etc. Like I said, I strongly suspect something outside of CORE is going wrong, because the code is identical for all versions of Illustrator.

IIRC the error messages on Mac are more verbose. Is this issue on Mac or Windows?
Yes! Fixed with one keystroke. In AI20, GET requires an https connection. I'm now in the process of finishing common base-class dialogs, and will make sure error messages get shown when appropriate. I apologize for the false alarm.