-- ------------------------------------------------------------ -- -- protocol handler functions for native http access -- -- Version : $Id: ProtocolHandlerHttpNativeOrCurl.hs,v 1.2 2004/03/19 19:09:40 hxml Exp $ module ProtocolHandlerHttpNativeOrCurl ( getHttpContentsNativeOrWithCurl ) where import XmlState import Network.URI ( URI ) import ProtocolHandlerHttpNative ( getHttpContentsWithHttp ) import ProtocolHandlerHttpCurl ( getHttpContentsWithCurl ) -- ------------------------------------------------------------ -- -- the http protocol handler switch for internal / external access getHttpContentsNativeOrWithCurl :: URI -> XmlStateFilter a getHttpContentsNativeOrWithCurl uri n = do curl <- getSysParamInt "withCurl" 0 ( if curl /= 0 then getHttpContentsWithCurl else getHttpContentsWithHttp ) uri n -- ------------------------------------------------------------