# How to get and post request with processing for android

**URL:** <https://discourse.processing.org/t/how-to-get-and-post-request-with-processing-for-android/30918>\
**Category:** Processing for Android\
**Created:** [June 25, 2021, 11:45pm UTC](https://discourse.processing.org/t/how-to-get-and-post-request-with-processing-for-android/30918 "2021-06-25T23:45:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juanjoc](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@juanjoc](https://discourse.processing.org/u/juanjoc)\
**Post date:** [June 25, 2021, 11:45pm UTC](https://discourse.processing.org/t/how-to-get-and-post-request-with-processing-for-android/30918/1 "2021-06-25T23:45:45Z")

</div>

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:

```auto
import http.requests.*;
JSONObject json; 
GetRequest leerTs = new GetRequest("https://blablabla.com/field/1.json?api_key=123456789&results"); //this URL is just an example

void setup()
{
  //orientation(LANDSCAPE);//this is for android mode
  size(displayWidth, displayHeight);
  background(200,100,10);
}
void draw()
{
  leerTs.send();
  String answer = leerTs.getContent();
  println(answer);
  delay(2000);
}

```

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
