# Logic Post Query

**URL:** <https://community.homey.app/t/logic-post-query/109375>\
**Category:** Questions & Help\
**Tags:** homey-pro\
**Created:** [May 5, 2024, 4:29pm UTC](https://community.homey.app/t/logic-post-query/109375 "2024-05-05T16:29:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Damian](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@Damian](https://community.homey.app/u/Damian)\
**Post date:** [May 5, 2024, 4:29pm UTC](https://community.homey.app/t/logic-post-query/109375/1 "2024-05-05T16:29:34Z")

</div>

Hi, can someone help me call the following question by POST in homey pro?

```auto
const res = await fetch("https://libretranslate.com/translate", {
	method: "POST",
	body: JSON.stringify({
		q: "test",
		source: "pl",
		target: "en",
		format: "text",
		api_key: ""
	}),
	headers: { "Content-Type": "application/json" }
});

console.log(await res.json());

```

and extract the “test” response from the API response

```auto
{
    "translatedText": "test"
}

```

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [May 5, 2024, 4:58pm UTC](https://community.homey.app/t/logic-post-query/109375/2 "2024-05-05T16:58:01Z")

</div>

Not sure if you want to use Homeyscript only, but with this flowcard below you can have the result returned:

> [@HTTP post form problem](https://community.homey.app/t/http-post-form-problem/109286/4):
>
> ![Screenshot from 2024-05-04 22-16-50](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/9/59496fffb06e20c469ba928650a3ae91595aa013.png)

Your post request should be something like this:  
`https://libretranslate.com/translate?q=Hello!&source=en&target=es&format=text&api_key=myapikey`
