title: How to send byte array in c# ApiController
body: <p>Could someone please tell me how i can test this function :</p>
  
  <pre><code>[RoutePrefix("service")]
  public class TestControler : ApiController
  {
      [Route("function-route")]
      [HttpPost]
      public HttpResponseMessage Testfunction(TestData t_testData )
      {
          ...
          HttpResponseMessage httpResponseMessage = Request.CreateResponse(HttpStatusCode.OK);
          return httpResponseMessage;
      }
  }
  
  public class TestData
  {
      public byte[] PreviewImage { get; set; }
      public byte[] FileAsByteArray { get; set; }
  }
  </code></pre>
  
  <p>We have Swagger enabled via :</p>
  
  <pre><code>public void Configuration(IAppBuilder appBuilder)
  {
      // Configure Web API for self-host. 
      HttpConfiguration config = new HttpConfiguration();
  
      //Using AttributeRoutes
      config.MapHttpAttributeRoutes();
  
      //Swagger
      config.EnableSwagger(c =&gt;{
          c.SingleApiVersion("v1", "My Test API");
      }).EnableSwaggerUi();
  
      appBuilder.UseWebApi(config);
  }
  </code></pre>
  
  <p>I really do not know how to test this API via swagger, or postman, or curl. The problem ist the byte[], how to send this?
  Does anyone how to test these kind of api?</p>
  
  <p>Or, if there is another way to send any file (pdf, txt, docx, ...) combined with any picture (jpg, png, ...) without byte[], i would be glad to hear.</p>