mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Merged Mark's fork in
This commit is contained in:
27
NzbDrone.Core/Controllers/HttpController.cs
Normal file
27
NzbDrone.Core/Controllers/HttpController.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
namespace NzbDrone.Core.Controllers
|
||||
{
|
||||
class HttpController : IHttpController
|
||||
{
|
||||
public string GetRequest(string request)
|
||||
{
|
||||
//Get the request and return as String Array
|
||||
|
||||
try
|
||||
{
|
||||
var webClient = new WebClient();
|
||||
return webClient.DownloadString(request);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex);
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user