PivotalTrackerAPI/Domain/Services/PivotalService.cs
/// <summary>
/// Generic method for getting data from the Pivotal API and returning the response
/// </summary>
/// <param name="url">The url to submit to</param>
/// <returns>The response from Pivotal</returns>
Generic method for getting data from the Pivotal API and returning the response
Generic method for getting data from the Pivotal API and returning the response
public static XmlDocument GetData(string url)
    {
      var uri = new Uri(url);
      HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
      Stream objStream;
      objStream = request.GetResponse().GetResponseStream();
      StreamReader objReader = new StreamReader(objStream);
      XmlDocument xmlDoc = new XmlDocument();
      xmlDoc.Load(objReader);
      return xmlDoc;
    }
public static XmlDocument GetData ( string url ) { var uri = new Uri ( url ) ; HttpWebRequest request = ( HttpWebRequest ) WebRequest . Create ( uri ) ; Stream objStream ; objStream = request . GetResponse ( ) . GetResponseStream ( ) ; StreamReader objReader = new StreamReader ( objStream ) ; XmlDocument xmlDoc = new XmlDocument ( ) ; xmlDoc . Load ( objReader ) ; return xmlDoc ; }
Generic method for getting data from the Pivotal API and returning the response
Generic method for getting data from the Pivotal API and returning the response
The response from Pivotal
The response from Pivotal
url
string
The url to submit to
The url to submit to