# HTTP Requests Error

**URL:** <https://discourse.processing.org/t/http-requests-error/27390>\
**Category:** Processing for Android\
**Created:** [January 26, 2021, 7:34pm UTC](https://discourse.processing.org/t/http-requests-error/27390 "2021-01-26T19:34:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bertin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/bertin/32/391_2.png) [@bertin](https://discourse.processing.org/u/bertin)\
**Post date:** [January 26, 2021, 7:34pm UTC](https://discourse.processing.org/t/http-requests-error/27390/1 "2021-01-26T19:34:03Z")

</div>

Hi all  
I’m trying to make a post request in my android sketch but I’m getting issues.

This is my code:

```auto
import http.requests.*;

void setup () {
        
    PostRequest post = new PostRequest("https:// < my REST API url >");
        
    post.addHeader("Content-Type", "application/json");  
    post.addData("{\"key1\":33,\"key2\":44,\"key3\":55}");
    post.send();
    
    println("Response: " + post.getContent());  
}

```

I’m using the latest version of the HTTP Requests for Processing library.

When I’m running the code in Java Mode it works fine and my API it’s correctly called with the json as payload of the request.

But when I try to run the code in Android Mode, building the sketch on my phone, I’m having this issue:

```auto
FATAL EXCEPTION: Animation Thread
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)'

```

I don’t understand what’s wrong, I guess it has something to do with Android since it’s working fine in Java Mode. Is Processing for Android not intended to make http requests?

I’m stuck with this for a while, I hope someone can help me. Thanks! 😊
