So I was looking for the best way to do this.
I want to use a URL to pull an image that can be in PNG JPG or GIF depending on my call.
Also, if the image does not meet my query, it will return XML and I will need to capture when that happens but not necessarily need to keep the XML returned.
I only want to make the request once.
Viewing the image isnít necessarily important to the person running the application as long as the request is actually made.
I am going to make this a multi-threaded application (which for me is the easy part, hah) but I am still working on this request evaluation.
Would the best way to approach this be create a stream then figure out if that stream in text or if the response was one of the image headers? I am fairly new to c# and I am learning new stuff every day, I just have not come across this yet.
I am trying to make a simple tool that can load test and give percentages of error on an application for work and our engineers and QA staff (including myself) use a java utility to do this currently I just thought it would be a fun project to dive into c# with.
Any ideas or comments would be greatly appreciated.