I have a WCF client that downloads content from a server.
service contract:
[OperationContract]
[WebGet(
UriTemplate = "/my/service/url/{method}/{filename}?tradeId={tradeId}&docType={docType}&language={language}&version={version}",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Bare)]
Stream GetDocument(string method, string filename, string tradeId, string docType, string version, string language);
The return type is a stream. I just simply write this stream to a file and it works.
Now I want to make changes to this. I want to know the MIME type of the loaded document. I know that it is installed correctly on the server. I just need to restore it.
I have little experience with WCF and I donβt know how to do this. Can anyone tell me?
Many thanks
Kevin source
share