-- Collection of code snippets by Arne Vajhøj 
-- posted to eksperten.dk, usenet and other places (2002-now) 
CREATE ASSEMBLY http FROM 'C:\http.dll' WITH PERMISSION_SET = UNSAFE
GO
CREATE FUNCTION HttpGet(@val NVARCHAR(1000))
RETURNS NVARCHAR(max)
AS
EXTERNAL NAME http.[E.Http].Get
GO
SELECT dbo.HttpGet('http://arne/')
GO
SELECT dbo.HttpGet('http://www.eksperten.dk/')
GO
DROP FUNCTION HttpGet
GO
DROP ASSEMBLY http
GO
