Skip to content

Instantly share code, notes, and snippets.

@dontdieych
Created September 12, 2014 06:17
Show Gist options
  • Save dontdieych/612606e2b3265a906c05 to your computer and use it in GitHub Desktop.
Save dontdieych/612606e2b3265a906c05 to your computer and use it in GitHub Desktop.
{-# 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"]
-- s = shelly
-- sv = s . verbosely
-- ss = s . silently
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment