How to get and post request with processing for android

Hello guys.
I am stuck on working with get and post methods with an URL. I have been programming this topic in processing.JAVA as follows:

import http.requests.*;
JSONObject json; 
GetRequest leerTs = new GetRequest(""); //this URL is just an example

void setup()
  //orientation(LANDSCAPE);//this is for android mode
  size(displayWidth, displayHeight);
void draw()
  String answer = leerTs.getContent();

I failed when trying it in android mode, I set android permissions like: internet, access_network_sketch and access_wifi_state, but it also fails. I wonder if there is a way of programing like this but in android mode.

Thanks in advance