Closed mbierman closed 2 years ago
Describe the bug I am having trouble sending a body in my URL request. I may be doing it wrong and perhaps this is just a request for better documentation.
Expected behavior I want to send JSON with my URL
To Reproduce Steps to reproduce the behavior:
{ "accessory": "HTTP-SWITCH", "name": "Printer Off Alert", "serialNumber": "SW007", "switchType": "stateless", "timeout": 1000, "onUrl": "https://maker.ifttt.com/trigger/homealert/json/with/key/***", "method": "POST", "headers": { "Content-Type": "application/json" }, "body": { "value1": "Printer turned off", "value2": "", "value3": "https://cdn6.aptoide.com/imgs/6/b/8/6b80c88a03910f16ea0c7cf062952174_icon.png?w=256" } }
The following does work but I would love to use the simpler unencoded format.
{ "accessory": "HTTP-SWITCH", "name": "Printer Off Alert", "serialNumber": "SW007", "switchType": "stateless", "timeout": 1000, "onUrl": "https://maker.ifttt.com/trigger/homealert/with/key/***?value1=%F0%9F%96%A8%20Printer%20turned%20off%20%F0%9F%96%A8&value2=&value3=https%3A%2F%2Fcdn6.aptoide.com%2Fimgs%2F6%2Fb%2F8%2F6b80c88a03910f16ea0c7cf062952174_icon.png%3Fw%3D256", "method": "POST" }
Version (output of npm list -g homebridge homebridge-http-switch)
npm list -g homebridge homebridge-http-switch
Configuration
see above.
Additional context Add any other context about the problem here.
Describe the bug I am having trouble sending a body in my URL request. I may be doing it wrong and perhaps this is just a request for better documentation.
Expected behavior I want to send JSON with my URL
To Reproduce Steps to reproduce the behavior:
The following does work but I would love to use the simpler unencoded format.
Version (output of![image](https://user-images.githubusercontent.com/1205471/133165438-e2d1f687-f842-4a52-8fd7-96597642717c.png)
npm list -g homebridge homebridge-http-switch
)Configuration
Additional context Add any other context about the problem here.