# \[JAVA\] POST Is the code you are requesting correct?

**URL:** <https://discourse.processing.org/t/java-post-is-the-code-you-are-requesting-correct/29300>\
**Category:** Libraries\
**Created:** [April 12, 2021, 11:22am UTC](https://discourse.processing.org/t/java-post-is-the-code-you-are-requesting-correct/29300 "2021-04-12T11:22:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [April 12, 2021, 11:22am UTC](https://discourse.processing.org/t/java-post-is-the-code-you-are-requesting-correct/29300/1 "2021-04-12T11:22:05Z")

</div>

> import http.requests.\*;
> 
> public void setup(){
> 
> PostRequest post = new PostRequest(“[http://cloud.efento.io](http://cloud.efento.io)”);  
> post.addHeader(“Content-Type”, “application/json”);  
> post.addData(“charset”, “UTF-8”);  
> post.addData(“X-Api-Token:”,“sdffsWED34sdfFG6wddV3”);  
> post.send(); //send request  
> println(post.getContent()); //print response
> 
> noLoop();
> 
> }
> 
> public void draw(){
> 
> }

 ![QQ](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/934a140d731cade37b1de01819eedb4f3192f2b9.jpeg)

This is the information within the EFENTO GATEWAY API V2 documentation.

I want to collect data through the API. Is it correct to receive data as above?

If you know, let me know. Please.

---

<div class="post-metadata">

**Author:** ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)\
**Post date:** [April 12, 2021, 11:33am UTC](https://discourse.processing.org/t/java-post-is-the-code-you-are-requesting-correct/29300/2 "2021-04-12T11:33:11Z")

</div>

you need to format the code with `</>` not as quotation. Also I recommend to delete the api key in the code 🙂

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [April 13, 2021, 11:30am UTC](https://discourse.processing.org/t/java-post-is-the-code-you-are-requesting-correct/29300/3 "2021-04-13T11:30:03Z")

</div>

Dear micuat / @micuat

Is the post code correct?  
Is it right to use it like that?

And I don’t know how to make a post form.

And I got the sdk file, but I don’t know how to use it.

---

<div class="post-metadata">

**Author:** ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)\
**Post date:** [April 13, 2021, 1:57pm UTC](https://discourse.processing.org/t/java-post-is-the-code-you-are-requesting-correct/29300/4 "2021-04-13T13:57:01Z")

</div>

no that’s not how you format the code. there is `</>` button that creates

````
```
```

````

in the editor and you post the code in between.

Could you tell us a bit more what you are trying to do? You are using POST request, so do you want to upload data? Or are you retrieving data from the cloud server? Also please don’t make another thread if you want to ask a highly relevant question 🙂
