quahdg
Last Updated: February 25, 2016
·
4.08K
· iondrimba
178548

Read text/xml file via C# over HTTP and get its content

//namespace
using System.Net;

string fileLocation = "http://site/file.txt"; ( could also be a xml file )

WebClient client = new WebClient();
Stream stream = client.OpenRead(fileLocation);
StreamReader reader = new StreamReader(stream);
String content = reader.ReadToEnd();
Say Thanks
Respond

1 Response
Add your response

11834

can you give more information about this because I'm new to this thing.

over 1 year ago ·