title: How to open a file received as a binary content in the HTTP body using RestSharp in it's associated editor
body: <p>As per the requirement, I've to call the REST service which will send back an attachment or a file as a binary content of the file in the HTTP body and the appropriate value of the content-type header and i need to open the contents in it's specific editor.</p>
  <p>I'm using RestSharp and below is the code for the same: For eg. if the attachment is .doc-</p>
  <pre><code>var client = new RestClient(Properties.Settings.Default.RestServicesUrl + Constants.RestTicketServices);
  var restRq = new RestRequest(Constants.SearchTicket);
  restRq.Method = Method.GET;
  restRq.RequestFormat = DataFormat.Json;
  restRq.AddParameter(&quot;account_id&quot;, &quot;10&quot;);
  client.Authenticator = new HttpBasicAuthenticator(Properties.Settings.Default.RestAuthenticationUserName, Properties.Settings.Default.RestAuthenticationPass);
  IRestResponse rest = client.Execute(restRq);
  </code></pre>
  <p>So, after this call:</p>
  <pre><code>rest.ContentType = &quot;application/vnd.openxmlformats-officedocument.wordprocessingml.document; charset=utf-8&quot;
  rest.Content = has binary data for the word document
  </code></pre>
  <p>and so on....</p>
  <p>Basically, I'm looking how i can read the binary contents and open the same in the associated editor.</p>
  <p>.xls - Excel
  .doc - Word
  .pdf - Adobe and so on.....</p>