title: Laravel send file to a compiler and receive response problem
body: <p>I tried to send multiple files, from my back end Laravel (v7.3) to a container with a compiler, i use RemoteCodeCompiler for this, but every time I send my files I receive :</p>
  <p><code>Link: http://localhost:8080/compiler/java</code></p>
  <pre><code>{
      output: &quot;&quot;
      expectedOutput: &quot;0, 1, 2, 3, 4, 5, 6, 7, 8, 9\n&quot;
      status: &quot;Compilation Error&quot;
      date:   &quot;2022-07-28T20:21:45.299959&quot;
  }
  </code></pre>
  <p>but when I test with postman I have this :</p>
  <pre><code>{
      &quot;output&quot;: &quot;0, 1, 2, 3, 4, 5, 6, 7, 8, 9\n&quot;,
      &quot;expectedOutput&quot;: &quot;0, 1, 2, 3, 4, 5, 6, 7, 8, 9\n&quot;,
      &quot;status&quot;: &quot;Accepted&quot;,
      &quot;date&quot;: &quot;2022-07-28T20:38:58.453017&quot;
  }
  </code></pre>
  <p>the code from my back end for sending the request is this :</p>
  <pre><code>$response = Http::attach('inputFile', '1', 'input.txt')
                      -&gt;attach('outputFile', $question-&gt;validation, 'output.txt')
                      -&gt;attach('sourceCode', $code, $fileName)
                      -&gt;post($url, [
                        'memoryLimit' =&gt; 500,
                        'timeLimit' =&gt; 30
                      ]); 
  </code></pre>
  <p>I have tried to create the file and do a <code>file_get_content</code> or <code>fopen</code> in the attachment but nothing has changed. I have checked the contents and the file extension in this situation and everything is correct.</p>
  <p>I have tried another way with this :</p>
  <pre><code>$client = new Client();
      $response = $client-&gt;request('POST', $url, [
        'multipart' =&gt; [
          [
            'name' =&gt; 'inputFile',
            'contents' =&gt; '1',
            'filename' =&gt; 'input.txt'
          ],
          [
            'name' =&gt; 'outputFile',
            'contents' =&gt; $question-&gt;validation,
            'filename' =&gt; 'output.txt'
          ],
          [
            'name' =&gt; 'sourceCode',
            'contents' =&gt; $code,
            'filename' =&gt; $fileName
          ], 
          [
            'name' =&gt; 'memoryLimit',
            'contents' =&gt; 500
          ],
          [
            'name' =&gt; 'timeLimit',
            'contents' =&gt; 30
          ]
        ]
      ]);
  </code></pre>
  <p>but the request is never sent</p>
  <p>The content of the source code for both is :</p>
  <pre><code>public class Test1 {
  
      public static void main(String[] args) {
          
          int i = 0;
          
          while (i &lt; 10) {
              System.out.print(i++);
              if( i &lt; 10)
                  System.out.print(&quot;, &quot;);
          }
      }
  }
  </code></pre>
  <p>and the value of <code>$filename</code> is <code>source.java</code> and the link is for compiled in java</p>
  <p>In the swagger.ui each post for compilation needs this:</p>
  <pre><code>inputFile
  file
  (formData)
  (optional)
  
  memoryLimit
  integer($int32)
  (query)
  
  outputFile
  file
  (formData)
  
  sourceCode
  file
  (formData)
  (the file need to be the good extention : .java for java .c for c etc.)
  
  timeLimit
  integer($int32)
  (query)
  </code></pre>
  <p>Even if the inputFile is optional in the description you need to put a file</p>
  <p>I have tried to inspect the request with :</p>
  <pre><code>http::fake();
  
  $repsonse = ...
  
  Http::assertSent(function (Request $request) {
        return $request-&gt;url() == 'http://localhost:8080/compiler/java';
      });
  
  </code></pre>
  <p>but i receive this :</p>
  <pre><code>&quot;Argument 1 passed to App\\Http\\Controllers\\Api\\ActivityController::App\\Http\\Controllers\\Api\\{closure}() must be an instance of Illuminate\\Http\\Request, instance of Illuminate\\Http\\Client\\Request given, called in /home/xxxx/heig-quiz/vendor/laravel/framework/src/Illuminate/Http/Client/Factory.php on line 353&quot;
  
  </code></pre>
  <p>I have tried multiple research to find a solution but I have found nothing that can help me in this situation. I don't know what is the problem, the only thing I'm sure of is there is a problem with the file source code if anyone can help this will be great.</p>
  <p>Sorry for my English and have a nice day.</p>