Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Question

Posted

Hi,

 

net.HTTPClient strips query string parameters – firmware 5.200.13 bug

 

I'm running HC3 Lite with firmware 5.200.13 and I've discovered a critical bug with net.HTTPClient in Lua scenes.

Problem When making a GET request with query string parameters, the HC3 completely strips everything after the ?character before sending the request.

 

Example:

client:request("https://httpbin.org/get?SNs=EH257001316", {
    options = { method = "GET", ... },
    success = function(res)
        print(res.data)
    end
})

 

Expected result:

{ "args": { "SNs": "EH257001316" }, "url": "https://httpbin.org/get?SNs=EH257001316" }

 

Actual result:

{ "args": {}, "url": "https://httpbin.org/get" }

 

The query string is completely missing! The same request works perfectly in Postman with identical URL and headers.

Tested workarounds – all failed:

  • params option in HTTPClient
  • URL encoding the query string
  • Passing parameters in request body
  • Different header combinations

Impact: Any external API that requires GET query parameters is completely unreachable from HC3 Lua scenes.

 

I have an HC3 Lite running firmware 5.200.13. I'm trying to call an external REST API from a Lua scene using net.HTTPClient, but any GET request with query string parameters fails because the parameters never reach the server.
I confirmed this using httpbin.org – the args field is always empty and the URL is logged without the query string.
Same request works fine in Postman. Headers are correct. Token is valid.

 

Could you help me?

 

Tibor

 

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

FW: 5.201.18 - on "big" HC3, not the lite - but I think they run the same net lib.

Please login or register to see this code.

Log:

Please login or register to see this code.


I would be surprised if the HC3 Lite stripped the queries, as it would crash many existing QAs... and we would se a lot of reports on the forum...

Edited by jgab
  • 0
Posted

@iTibor thanks, I've just confirmed the problem. It works fine in the quick apps if you need a quick fix. Quick apps Lua is slightly different than in scenes. 

The fix should be included in the next beta update (5.203), but I cannot say for sure at the moment. 

  • Like 2
  • 0
Posted

Have you found a solution to this problem?
I can confirm that the issue described occurs in version 5.210.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...