Android ofLoadURL() / ofHTTPRequest() not working


Been trying and failing to get any request through on an Android device using the core ofLoadURL(“”);

Manifest: Adding Access to the internet:

<uses-permission android:name="android.permission.INTERNET"></uses-permission> (Whole file).

App Code: (ofApp::setup)

ofHttpResponse response = ofLoadURL("");

    if (200 == response.status)
        std::string data =;
        ofLog(OF_LOG_NOTICE, data);
//        std::string result =;
    } else {
        ofLog(OF_LOG_FATAL_ERROR, ofToString(response.status));

Currently tested on Google Nexus 4 (just for sanity, yes the device internet is on and working).

Console Error:

05-27 17:13:20.280: E/ofURLFileLoader(12342): handleRequest(): No message received
05-27 17:13:20.280: A/(12342): -1
This seems broken, however could be missing a critical step here.
Please advise or how can we fix? :D!

GitHub Issue:


i think google wil always redirect to it’s https version, redirection should work too but perhaps you can try using the https url directly


Think you might be right with that test link. However was happening with any link I was requesting (http)

I tested opening a example application with same workspace, and it worked. So no idea what is going on.
I tested the environment on another system build with Windows (all same files, build etc), using same eclipse project, and it works with problem project.

Something wrong with My OSX eclipse project… Such a weird one. Still can’t trace it…



So it is now working and I think I traced it down to a missing /libs/android-support-v4.jar in my project directory.

The .jar wasn’t uploaded to the git repo I am working off and yeah I think it was the cause of the issue.



i experience a similar problem with e.g.: ofLoadURL(“”) using AndroidStudio on current master.

i see the dependency to android-support-v4 in the gradle file:
compile ''

getting the error from curl tells me:

from error-buffer:
"SSL certificate problem: unable to get local issuer certificate"

and for the returned CURLCode CURLE_SSL_CACERT:
"Peer certificate cannot be authenticated with given CA certificates"

to get first error-line, i added this to ofURLFileLoaderImpl::handleRequest:

char errorbuf[CURL_ERROR_SIZE];
curl_easy_setopt(curl.get(), CURLOPT_ERRORBUFFER, errorbuf);

any ideas how to make this work?