Web Service with headers
<p>I'm picking up a prototype that my coworker built.  I'm a total noob with C# and web services unfortunately.  One method in the service is like:</p>

<pre><code>    [WebGet(UriTemplate = "GetTestData/{file}")]
    public Stream GetTestData(string file)
    {
        string fileName =
           "\\filePath" + file;
        if (File.Exists(fileName))
        {
            FileStream stream = File.OpenRead(fileName);
            if (WebOperationContext.Current != null)
            {
                WebOperationContext.Current.OutgoingResponse.ContentType = "text/.txt";
            }
            return stream;
        }
        return null;
    }
</code></pre>

<p>When I type in the URL from my device like</p>

<pre><code>http://filepath/myFile1.txt
</code></pre>

<p>then I get myFile1.txt.  She said it was a rest service.  Is there an easy way to add headers to this so I can just send the device all the data at once?</p>

<p>Like on the device I can ask for</p>

<pre><code>http://filePath/myFiles
</code></pre>

<p>and get myFile1-myFile5.txt?  Right now, the crude implementation is I have to ask for each file individually.  It would seem better to have the server responsible for sending the packets right?  Or is that breaking her rest service? Thanks!</p>
