Created
March 19, 2014 18:37
-
-
Save brendonanderson/9648323 to your computer and use it in GitHub Desktop.
UPnP Blog - Turn on request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTPBuilder http = new HTTPBuilder("http://192.168.1.120:49153/upnp/control/basicevent1") | |
http.request(Method.POST, ContentType.XML) { | |
body = '<?xml version="1.0" encoding="utf-8"?>' + | |
'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">' + | |
'<s:Body>' + | |
'<u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1">' + | |
'<BinaryState>1</BinaryState>' + | |
'</u:SetBinaryState>' + | |
'</s:Body>' + | |
'</s:Envelope>' | |
headers.'SOAPACTION' = "\"urn:Belkin:service:basicevent:1#SetBinaryState\"" | |
headers.'Content-Type' = "text/xml; charset=\"utf-8\"" | |
headers.'Accept' = "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment