title: Send with ruby request with array
body: <p>I have to make a request to an API, and one of the properties of the body is an Array (Directorios), my question is, how to send it as an array type, and not as a string as I show it in the following code</p>
  <pre class="lang-rb prettyprint-override"><code>require 'uri'
  require 'net/http'
  require 'json'
  
  UbicacionesCambios = Array.new
  UbicacionesCambios.push(&quot;/Codigo/WebApi/Bccr.WebApi.Auten.csproj&quot;)
  UbicacionesCambios.push(&quot;/Codigo/WebApi/Bccr.WebApi.Auten.csproj1&quot;)
  #Actualizacion de codigo de nuget BCCR
  temp = &quot;&quot;
  puts &quot;  Preparacion de actualizacion&quot;
  uri = URI('http://localhost/api/Devops.API/migrador?api-version=1')
  req = Net::HTTP::Post.new(uri, 'Content-Type' =&gt; 'application/json')
  req.body = {
      &quot;id&quot;:&quot;9dedf35e-7df-4992-b03d-edfe24c302a9&quot;,
      &quot;NombreProyecto&quot;:&quot;WebApi&quot;,
      &quot;NombreColeccion&quot;:&quot;Insti&quot;,
      &quot;AzureHostName&quot;:&quot;http://mydomain:8080/tfs&quot;,
      &quot;Rama&quot;:&quot;test&quot;,
      &quot;UltimoCommit&quot;:&quot;f4afdfasdfasdfasdfadsfdsfdda2faf00c25a0a&quot;,
      &quot;Componente&quot;:&quot;WebApi.Nuget&quot;,
      &quot;Version&quot;:&quot;1.0.0.1&quot;,
      &quot;Directorios&quot;: [&quot;#{UbicacionesCambios}&quot;]
      #&quot;Directorios&quot;:[&quot;1&quot;,&quot;2&quot;]
  }.to_json
  puts &quot;  Ejecucion de actualizacion codigo nugets BCCR&quot;
  res = Net::HTTP.start(uri.hostname, uri.port) do |http|
      http.request(req)
  end
  puts res.body if res.is_a?(Net::HTTPSuccess)
  puts &quot;  Resultado actualizacion de codigo #{res.body}&quot;
  </code></pre>
  <p>Why when it reaches the Api, it is shown like this
  [&quot;/Codigo/WebApi/Bccr.WebApi.Auten.csproj&quot;, &quot;/Codigo/WebApi/Bccr.WebApi.Auten.csproj1&quot;]
  an array of a single field</p>