# Using HTTP Request - how to get and use the HTTP status codes

**URL:** <https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132>\
**Category:** Apps\
**Created:** [November 9, 2020, 3:57pm UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132 "2020-11-09T15:57:28Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goose](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@Goose](https://community.homey.app/u/Goose)\
**Post date:** [November 9, 2020, 3:57pm UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/1 "2020-11-09T15:57:29Z")

</div>

Hopefully created in correct category.

I’m building a flow using the HTTP Request app.  
What I want to achieve is doing a HTTP GET and build a condition flow based on the HTTP status codes (like 200 or 404).

First hurdle:  
I’m using the HTTP Request app and I’m using the card “HTTP request flow cards” GET  
In the “Text” field I have:  
“[http://www](http://www).(myTag).com” (my tag is, let’s say “Google”)

When testing this, I’m getting:  
_“Missing Tag in flow card”_  
I’m using a string variable in Better Logic for the tag, which has the value of “Google”.  
I have also tried just the whole URL: [http://www.google.com](http://www.google.com)  
But same error.

If I can get this to work, I would like to use a condition, based on the HTTP status code to determine the next step.

Does anyone have a sample HTTP Request flow with something similar I can look at?  
I’ve search this forum and I did find a number of examples, the majority were POST and interacting with JSON.

Thanks!

---

<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 9, 2020, 4:26pm UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/2 "2020-11-09T16:26:46Z")

</div>

Can u post the flow here?  
Now we have to guess that ur using something like www.(tag is called google) .com.  
Showing a pic of the flow tells us so much more then a 1000 words.

---

<div class="post-metadata">

**Author:** ![Goose](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@Goose](https://community.homey.app/u/Goose)\
**Post date:** [November 9, 2020, 4:35pm UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/3 "2020-11-09T16:35:33Z")

</div>

Ah, good point, I will add a picture next time.

In the meantime I figured it out, now using the C20 “HTTP Get code” card in the “AND” condition.  
Seems that it was built for that purpose.

Thanks!

---

<div class="post-metadata">

**Author:** ![Gennady](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gennady/32/18451_2.png) [@Gennady](https://community.homey.app/u/Gennady)\
**Post date:** [October 13, 2021, 11:40am UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/4 "2021-10-13T11:40:09Z")

</div>

Can someone help me  
how can I take this numbers every day at 13:00 pm?  
from this site

 ![Снимок экрана 2021-10-13 в 13.20.38](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/e/0e9315b7ecf684a90be2b48548d626136ff5cdfc.png)  
from this URL.  
[https://pvoutput.org/list.jsp?id=96952&sid=86654](https://pvoutput.org/list.jsp?id=96952&sid=86654)

---

<div class="post-metadata">

**Author:** ![CorvanderNiet](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/corvanderniet/32/11702_2.png) [@CorvanderNiet](https://community.homey.app/u/CorvanderNiet)\
**Post date:** [November 20, 2022, 10:45am UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/5 "2022-11-20T10:45:12Z")

</div>

Hi! Any chance to get this app ready with SDK3 for Homey Pro 2023?

---

<div class="post-metadata">

**Author:** ![CorvanderNiet](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/corvanderniet/32/11702_2.png) [@CorvanderNiet](https://community.homey.app/u/CorvanderNiet)\
**Post date:** [January 10, 2023, 2:40pm UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/6 "2023-01-10T14:40:24Z")

</div>

It seems there is no support for this app anymore. So it won’t work on Homey Pro 2023 ☹  
I use(d) the HTTP request app to do this:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/f/1faa25ac75577f8a03de3f5aca5a16f3a77a8a02.png)  
and  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/2/b29eef151413ffd9eb20469732a4170329f9197a.png)

Can anybody help me with an alternative app that makes it possible to do the same?

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [January 10, 2023, 5:42pm UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/7 "2023-01-10T17:42:16Z")

</div>

You should be able to read the JSON with the built in http logic card (AND card). Then extract the field from the Json with the Json logic card.  
But you need AdvancedFlow to use the Json card because you have to combine another card to work with the result value.

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [January 10, 2023, 5:51pm UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/8 "2023-01-10T17:51:02Z")

</div>

Sadly no XML support in Homey http get cards. 😢

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [January 10, 2023, 7:25pm UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/9 "2023-01-10T19:25:23Z")

</div>

In http flow cards app this is missing, too - like anywhere else in JS environment.  
You would **need a npm module to convert XML to JSON**. This would be be something nice for:

> **[JSON Handler](https://homey.app/nl-nl/app/nl.qluster-it.JsonHandler/JSON-Handler/)**
>
> JSON handler and manipulator

@Arie_J_Godschalk 😉

Perhaps a flow action to input a XLM string and get a JSON string back that can be parsed with a JSON path.  
I’m using `fast-xml-parser` here [homey.qnap/qnapApi.js at main · RonnyWinkler/homey.qnap · GitHub](https://github.com/RonnyWinkler/homey.qnap/blob/main/qnapApi.js#L108)

But for XML it’s difficult to decide is a single element is an element or one line of an array (without the XSD definition). In that case you will get different outputs for a one line array and a two line array… but I digress 🙂

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [January 10, 2023, 7:46pm UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/10 "2023-01-10T19:46:10Z")

</div>

My solar inverter does XML (steca) but have scripts parsing and a webhook to Homey. The http flow app isnt sdk3 so yeah. Homey internal http is json only.

---

<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:** [January 11, 2023, 7:16am UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/11 "2023-01-11T07:16:48Z")

</div>

> [@RonnyW](#):
>
> In http flow cards app this is missing, too

No, it also supports XML:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/1/f1cbb19e79c9194f6ec1862e09af7465415eb463.png)

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [January 11, 2023, 7:25am UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/12 "2023-01-11T07:25:10Z")

</div>

Ah, thanks. I only looked at the card titles.

---

<div class="post-metadata">

**Author:** ![CorvanderNiet](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/corvanderniet/32/11702_2.png) [@CorvanderNiet](https://community.homey.app/u/CorvanderNiet)\
**Post date:** [January 11, 2023, 7:44am UTC](https://community.homey.app/t/using-http-request-how-to-get-and-use-the-http-status-codes/37132/13 "2023-01-11T07:44:23Z")

</div>

So my worry is that this app wont be supported on the new Homey Pro. Is there an alternative app that has the same features? If not: is there a developer who is willing to take over this app and make it SDK3 proof?
