Comments (5)
RESTful interface requires you to POST or PUT instead of a GET
It would be nice if we could have the option to provide the HTTP method for the URL.
I too have some of my own custom software that I have amazon-echo-ha-bridge
pointing at and had to make my URL endpoints GET
s. I'm not very comfortable with this, as GET
urls are easy to hit and these URLs are pointing at potentially important things. I'd prefer they be POST
s or PUT
s. If anything, it's more compliant with a REST system.
If anything, it'd be nice the default was POST
.
from amazon-echo-ha-bridge.
I agree. I was initially worried/lazy about the difficulty of creating
templates for the post/put body nor had any use case that required a
different http method . Should be an easy add. Should be in the next
release this week.
On Wed, Aug 12, 2015, 12:23 Jon Maddox [email protected] wrote:
RESTful interface requires you to POST or PUT instead of a GET
It would be nice if we could have the option to provide the HTTP method
for the URL.I too have some of my own custom software that I have
amazon-echo-ha-bridge pointing at and had to make my URL endpoints GETs.
I'm not very comfortable with this, as GET urls are easy to hit and these
URLs are pointing at potentially important things. I'd prefer they be POSTs
or PUTs. If anything, it's more compliant with a REST system.If anything, it'd be nice the default was POST.
—
Reply to this email directly or view it on GitHub
#25 (comment)
.
from amazon-echo-ha-bridge.
Should be in the next release this week
Nice!! Thanks!
from amazon-echo-ha-bridge.
added in 28ba226
from amazon-echo-ha-bridge.
please try out in the preview v0.2.1 release. create a new device
{
"name": "test device",
"deviceType": "switch",
"offUrl": "http://192.168.1.201:3480/data_request?id=action&output_format=json&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0&DeviceNum=31",
"onUrl": "http://192.168.1.201:3480/data_request?id=action&output_format=json&DeviceNum=31&serviceId=urn:upnp-org:serviceId:Dimming1&action=SetLoadLevelTarget&newLoadlevelTarget=${intensity.percent}",
"contentType" : "application/json",
"httpVerb":"POST",
"contentBody" : "{"fooBar":"baz"}"
}
note the escape of quotes in the content body. currently no validation of the content type, invalid content types WILL explode!
from amazon-echo-ha-bridge.
Related Issues (20)
- Possible to run on Android using Linux? HOT 2
- Fire TV stick compatible?
- This past week has bridge and Alexa not communicating anymore HOT 2
- Hue Bridge seems to have lost all my devices
- Build Failure on Raspbian with Docker
- Alexa not discovering the bridge HOT 1
- Trouble running habridge
- Support command value in content-body
- How to use with a Phillips smart bulb?
- UpnpListener encountered an error. Shutting down HOT 3
- No devices discovered after recent changes in Alexa
- encountering errors on upgrading from v0.2.1 HOT 1
- make it compatible with bluetooth hue lights
- Error when starting application with Java / Docker
- Configurator not working
- help installing amazon-echo-bridge-*.jar HOT 3
- Start on Android HOT 2
- Alexa keeps forgetting HA Bridge HOT 3
- How do create sonos devices on amazon HA bridge HOT 1
- Having trouble installing on Synology NAS DS216play HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-echo-ha-bridge.