# Post Request transform to GET Method

**URL:** <https://discourse.processing.org/t/post-request-transform-to-get-method/22927>\
**Category:** Libraries\
**Created:** [July 30, 2020, 11:17am UTC](https://discourse.processing.org/t/post-request-transform-to-get-method/22927 "2020-07-30T11:17:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![b005](https://avatars.discourse-cdn.com/v4/letter/b/e36b37/32.png) [@b005](https://discourse.processing.org/u/b005)\
**Post date:** [July 30, 2020, 11:17am UTC](https://discourse.processing.org/t/post-request-transform-to-get-method/22927/1 "2020-07-30T11:17:52Z")

</div>

Hello,

I purchased a board which has the code written in Processing, I want to use GET Method to upload data using URL to my server, but the board has only post request following code:

Could you please help me to transform into GET Method?

Thanks!

```auto
int thingSpeakPostTime = millis() + 10000;
void updateMQTT()
{
   if(millis() > thingSpeakPostTime)
   {      
      PostRequest post = new PostRequest("https://DOMAIN/api/api_loc.php?imei=X&dt=X&lat=X&lng=X&altitude=X&angle=X&speed=X&loc_valid=1");
      
      post.send();
      println("Reponse Content: " + post.getContent());
      println(post); 
   }
}

```

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [August 5, 2020, 11:02pm UTC](https://discourse.processing.org/t/post-request-transform-to-get-method/22927/2 "2020-08-05T23:02:28Z")

</div>

Usually if the server only accepts post methods, then you need to create a post request in your code. If you send a GET request and the server does not know how to process it, you will get an error in the response, maybe a 500 error saying something like the server doe snot know how to handle that request.  
You can attach data in the body of a POST request. You will need to check the API and documentation provided by the app running in the server. If need more help, do not hesitate to share a link to their docs here.

Kf

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [August 6, 2020, 12:19am UTC](https://discourse.processing.org/t/post-request-transform-to-get-method/22927/3 "2020-08-06T00:19:55Z")

</div>

> [@b005](#):
>
> I purchased a board which has the code written in Processing

Hello,

Can you please share details about the “board” that you purchased?

`:)`
