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

http request custom headers


Question

Posted

Is there a way i can use custom headers in a http request with lua?

I am trying to control a epson projector, but i need to set the referer in header.

Please login or register to see this code.

7 answers to this question

Recommended Posts

  • 0
Posted

I'd like to know this too!

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" />

  • 0
Posted

I would like to know this as well.

 

I have a virtual device (so can't use net.HTTPClient which I know can have custom headers), and I need to set the content type of a POST.

 

Thanks.

  • 0
Posted

Is there a way i can use custom headers in a http request with lua?

I am trying to control a epson projector, but i need to set the referer in header.

 

Please login or register to see this code.

 

Bumping this one in case somebody has a solution

I'm trying to control my Sony TV 

 

Thanks

-F

  • 0
Posted

Here's a link to a complete example I wrote. It contains:

- The correct URL encode of parameters (the "&" thingies in the url).

- passing of a custom header ( ["Content-Type"] = "application/x-www-form-urlencoded" )

- POST action

Does this help?

Please login or register to see this link.

If yo can show me "wireshark" capture of a working dialog with your device, I might be able to adapt the example to your specific needs... Or a document describing how the api on your device works.

  • 0
Posted

Here's a link to a complete example I wrote. It contains:

- The correct URL encode of parameters (the "&" thingies in the url).

- passing of a custom header ( ["Content-Type"] = "application/x-www-form-urlencoded" )

- POST action

Does this help?

Please login or register to see this link.

If yo can show me "wireshark" capture of a working dialog with your device, I might be able to adapt the example to your specific needs... Or a document describing how the api on your device works.

 

Thanks Peter

 

I was reading a post on the openremote forum last evening where people seemed to have cracked the problem of controlling the TV using POST and SOAP xml messages/headers bnut from pc and other devices. I was going to try from the HC2

 

Please login or register to see this link.

 

There are some references in the forum about suggestions and I was trying to find out if anybody had consistent success with Fibaro

 

Please login or register to see this link.

 

I going to give it a go this evening and see how I get on (my wife is out so mucking around with our main TV will be okay)

 

Rgds

-F

  • 0
Posted

I didn't check the links but I know what they mean by POST, DLNA and SOAP xml. Never implemented that, but I've got a feeling that you've got all the pieces of the puzzle... Now only... Yeah...

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" /> Give me a yell if you're stuck.

  • 0
Posted

Okay - I installed Device Spy from Intel - It looks like a upnp discovery tool among other things

 

A quick scan of my TV IP address revealed a few xml schemas. (TV is KDL-60W605L)

 

Please login or register to see this link.

 

and from a browser I get the following ...

I might be able to do something with this ......

Please login or register to see this code.

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...