title: Not receiving JSON data from Microsoft FaceAPI
body: <p>I am trying to get JSON data from a picture using <a href="https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236" rel="nofollow">Microsoft's FaceAPI</a>. I am receiving a StatusCode OK, but am not getting anything significant back. I have verified that the MemoryStream has the right data (which I am getting from an Image control) by saving it to a file.</p>
  
  <pre><code>    private async Task&lt;string&gt; GetJSON()
      {
          var client = new HttpClient();
          var queryString = HttpUtility.ParseQueryString(string.Empty);
  
          // Request headers
          client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "mykey");
  
          // Request parameters
          queryString["returnFaceId"] = "true";
          queryString["returnFaceLandmarks"] = "false";
          var uri = "https://api.projectoxford.ai/face/v1.0/detect?" + queryString;
  
          HttpResponseMessage response;
  
          // Request body
          byte[] byteData = ImageToByte();
  
  
          using (var content = new ByteArrayContent(byteData))
          {
              content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
              response = await client.PostAsync(uri, content);
          }
  
          return "";
      }
  
      private byte[] ImageToByte()
      {
          using (MemoryStream stream = new MemoryStream())
          {
              videoBox.Dispatcher.Invoke(delegate
              {
                  var encoder = new PngBitmapEncoder();
  
                  var flippedBitmap = new TransformedBitmap();
                  flippedBitmap.BeginInit();
                  flippedBitmap.Source = (BitmapSource)videoBox.Source;
                  var transform = new ScaleTransform(-1, 1);
                  flippedBitmap.Transform = transform;
                  flippedBitmap.EndInit();
                  encoder.Frames.Add(BitmapFrame.Create(flippedBitmap));
                  encoder.Save(stream);
  
              });
  
              using (FileStream test = new FileStream("snapshot.bmp", FileMode.Create))
              {
                  stream.Position = 0;
                  stream.CopyTo(test);
              }
  
              return stream.ToArray();
          }
      }
  </code></pre>