# POST HTTP request not working

**URL:** <https://community.homey.app/t/post-http-request-not-working/21464>\
**Category:** Questions & Help\
**Tags:** tools\
**Created:** [November 28, 2019, 4:32pm UTC](https://community.homey.app/t/post-http-request-not-working/21464 "2019-11-28T16:32:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![LazrQ](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lazrq/32/16975_2.png) [@LazrQ](https://community.homey.app/u/LazrQ)\
**Post date:** [November 28, 2019, 4:32pm UTC](https://community.homey.app/t/post-http-request-not-working/21464/1 "2019-11-28T16:32:12Z")

</div>

Hi,  
Just bought a Homey Pro. So, I am new to this. Thx for any help.

I have several HTTP requests setup in iOS Shortcuts to turn on/off lights.  
I am now trying to setup them up in Homey but can get it to work.

**In iOS the setup is as following:**

URL:  
[http://zapp-16200XXX.local/zrap/chscan/ch1](http://zapp-16200XXX.local/zrap/chscan/ch1)

Method:  
Post

Headers:

Request Body:  
Form

Request Body  
Cmd on

**In Homey I tried the following flow:**

HTTP request flow cards - POST form

URL:  
[http://zapp-16200xxx.local/zrap/chscan/ch1](http://zapp-16200xxx.local/zrap/chscan/ch1)

Data:  
{„cmd“: „On“}

I always get an error „400“.

Any suggestions why it is not working?

Thx a lot

Some screenshots:

iOS Shortcuts:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/d/ed8cc5048b578da1b3acb3f51457f7a0e73dce02.jpeg)

Homey:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/2/826d174a549d32064cc1ad5ec842252f5b5132fe.jpeg) ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/4/14fc00d224aab402ac406b386bc0de23bc107504.jpeg)

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [November 28, 2019, 4:50pm UTC](https://community.homey.app/t/post-http-request-not-working/21464/2 "2019-11-28T16:50:31Z")

</div>

And did u check [this post](https://community.homey.app/t/tutorial-using-siri-shortcuts-for-activating-flows-with-pics/7473) about it?

---

<div class="post-metadata">

**Author:** ![LazrQ](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lazrq/32/16975_2.png) [@LazrQ](https://community.homey.app/u/LazrQ)\
**Post date:** [November 28, 2019, 5:44pm UTC](https://community.homey.app/t/post-http-request-not-working/21464/3 "2019-11-28T17:44:33Z")

</div>

Thx. Yes, I did. I believe I have read any post in the forum about HTTP requests.

I want to replace http requests in Shortcuts with http requests in Homey.  
So, my problem is not related to the post you recommended. Thx anyway.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [November 28, 2019, 7:41pm UTC](https://community.homey.app/t/post-http-request-not-working/21464/5 "2019-11-28T19:41:47Z")

</div>

The iOS version is requesting `…/ch1` but the Homey version is requesting `…/ch` (missing a trailing “1”). Also, the iOS version is using lowercase “off” but the Homey version is using _start case_ “On”.

---

<div class="post-metadata">

**Author:** ![LazrQ](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lazrq/32/16975_2.png) [@LazrQ](https://community.homey.app/u/LazrQ)\
**Post date:** [November 29, 2019, 12:53pm UTC](https://community.homey.app/t/post-http-request-not-working/21464/6 "2019-11-29T12:53:00Z")

</div>

Thx all for your help.

I found a different command which works. I am using the „logic web request“ command instead of http request.

Code structure is same as used in iOS Shortcuts. See screenshot below.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/1/91e221c73f27249b688ce9965ff46f7386ac87db.jpeg)

---

<div class="post-metadata">

**Author:** ![Viktor](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/viktor/32/8030_2.png) [@Viktor](https://community.homey.app/u/Viktor)\
**Post date:** [November 29, 2019, 1:37pm UTC](https://community.homey.app/t/post-http-request-not-working/21464/7 "2019-11-29T13:37:33Z")

</div>

Zeptrion Air?

---

<div class="post-metadata">

**Author:** ![Erik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erik/32/9865_2.png) [@Erik](https://community.homey.app/u/Erik)\
**Post date:** [December 2, 2019, 8:55am UTC](https://community.homey.app/t/post-http-request-not-working/21464/8 "2019-12-02T08:55:55Z")

</div>

Hi all. Sorry for my late reaction. Maybe the difference is that my app sends the form variables with the querystring of the url request and the homey native card puts them in the body.  
I’m happy you were able to solve this using the native card.

---

<div class="post-metadata">

**Author:** ![LazrQ](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lazrq/32/16975_2.png) [@LazrQ](https://community.homey.app/u/LazrQ)\
**Post date:** [December 2, 2019, 10:25am UTC](https://community.homey.app/t/post-http-request-not-working/21464/9 "2019-12-02T10:25:29Z")

</div>

Hi Viktor,  
Yes, I use this to include my Feller Light/Shutter Switches using zeptrionAir into my HomeKit setup.

---

<div class="post-metadata">

**Author:** ![Viktor](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/viktor/32/8030_2.png) [@Viktor](https://community.homey.app/u/Viktor)\
**Post date:** [December 4, 2019, 6:23am UTC](https://community.homey.app/t/post-http-request-not-working/21464/10 "2019-12-04T06:23:21Z")

</div>

Then i am to late to help you, but anyway here how is working with the http app from Erik:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/f/afbfdef719afa13147fc484fdc45e2c2e48a3136.png)
