You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importhttp.requests.*;
publicvoidsetup() {
size(400, 400);
GetRequestget = newGetRequest("https://ipinfo.io/json");
get.send(); // d program will wait untill the request is completedprintln("response: " + get.getContent());
JSONObjectresponse = parseJSONObject(get.getContent());
println("status: " + response.getString("status"));
println("data: " + response.getJSONObject("data"));
}
and added <uses-permission android:name="android.permission.INTERNET"/> to the related AndroidManifest.xml
Output
...
BUILD SUCCESSFUL in 19s
25 actionable tasks: 25 executed
FATAL EXCEPTION: Animation Thread
Process: processing.test.test, PID: 22245
java.lang.IncompatibleClassChangeError: Class 'org.apache.http.conn.ssl.SSLSocketFactory' does not implement interface 'org.apache.http.conn.scheme.SchemeSocketFactory' in call to 'java.net.Socket org.apache.http.conn.scheme.SchemeSocketFactory.createSocket(org.apache.http.params.HttpParams)' (declaration of 'org.apache.http.impl.conn.DefaultClientConnectionOperator' appears in /data/app/processing.test.test-cwaQQ5qAEO9ZXXlmvpNwWQ==/base.apk)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
at http.requests.GetRequest.send(Unknown Source:61)
at processing.test.test.test.setup(test.java:43)
at processing.core.PApplet.handleDraw(PApplet.java:1878)
at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:478)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:518)
Expected behaviour
Get data from ipinfo.io and print it
When using HTTP instead of HTTPS, all works fine.
The text was updated successfully, but these errors were encountered:
Installed dependencies
Processing 3.5.4
HTTP-Requests-for-Processing: 0.1.5
Android Mode: 4.2.1
Code
and added
<uses-permission android:name="android.permission.INTERNET"/>
to the related AndroidManifest.xmlOutput
Expected behaviour
Get data from ipinfo.io and print it
When using HTTP instead of HTTPS, all works fine.
The text was updated successfully, but these errors were encountered: