Funktion zum auslesen der Payloads eines Http Request.
public static string readHttpPayload(string url)
{
HttpWebResponse response = (HttpWebResponse)HttpWebRequest.Create(url).GetResponse();
string payload = String.Empty;
using (StreamReader sr = new StreamReader(response.GetResponseStream()))
{
payload = sr.ReadToEnd();
}
response.Close();
return payload;
}
1 Kommentare zum Snippet