Last active
August 29, 2015 14:06
-
-
Save dontdieych/365a63515f7dbab2fa9f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
POST /smp_18_ HTTP/1.1 | |
Host: 192.168.219.6:7676 | |
Accept-Encoding: gzip | |
Content-Length: 725 | |
Content-Type: application/octet-stream | |
SOAPAction: urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI | |
User-Agent: haskell wreq-0.1.0.1 | |
<?xml version="1.0"?> | |
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> | |
<s:Body> | |
<u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"> | |
<InstanceID>0 | |
</InstanceID> | |
<CurrentURI> | |
</CurrentURI> | |
<CurrentURIMetaData/> | |
</u:SetAVTransportURI> | |
</s:Body> | |
</s:Envelope> | |
<!-- | |
POST /smp_18_ HTTP/1.1 | |
Host: 192.168.219.6:7676 | |
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI" | |
Accept-Language: en-us;q=1, en;q=0.5 | |
Accept-Encoding: gzip | |
Content-Type: text/xml; charset="utf-8" | |
User-Agent: gupnp-av-cp GUPnP/0.20.12 DLNADOC/1.50 | |
Connection: Keep-Alive | |
Content-Length: 1405 | |
--> | |
This file contains hidden or 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
{-# LANGUAGE OverloadedStrings #-} | |
-- {-# LANGUAGE ExtendedDefaultRules #-} | |
-- {-# OPTIONS_GHC -fno-warn-type-defaults #-} | |
import qualified Data.ByteString as BS | |
import Network.Wreq | |
import Control.Lens | |
-- import System.Environment | |
-- import Shelly | |
-- import qualified Data.Text as T | |
-- default (T.Text) | |
setURI = do | |
xml <- BS.readFile "/home/dontdieych/SetAVTransportURI.xml" | |
postWith opts "http://192.168.219.6:7676/smp_18_" xml | |
opts = defaults & header "SOAPAction" .~ ["urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"] | |
& header "Content-Type" .~ ["text/xml; charset=\"utf-8\""] | |
-- s = shelly | |
-- sv = s . verbosely | |
-- ss = s . silently |
This file contains hidden or 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
<?xml version="1.0"?> | |
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> | |
<s:Body> | |
<u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"> | |
<InstanceID>0 | |
</InstanceID> | |
<CurrentURI> | |
</CurrentURI> | |
<CurrentURIMetaData/> | |
</u:SetAVTransportURI> | |
</s:Body> | |
</s:Envelope> | |
<!-- | |
Captured packet from gupnp-av-cp | |
POST /smp_18_ HTTP/1.1 | |
Host: 192.168.219.6:7676 | |
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI" | |
Accept-Language: en-us;q=1, en;q=0.5 | |
Accept-Encoding: gzip | |
Content-Type: text/xml; charset="utf-8" | |
User-Agent: gupnp-av-cp GUPnP/0.20.12 DLNADOC/1.50 | |
Connection: Keep-Alive | |
Content-Length: 1405 | |
--> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment