title: How to sent a multipart/form-data POST request with XProc's p:http-request
body: <p>I'd like to send a document using a <code>multipart/form-data</code> POST request with XProc's <code>p:http-request</code> function; Multi-part is needed as there are a few form fields that need to be sent too.
  I just can't get the content of the file (an XSD file in my case) into to request.</p>
  <p>Any idea how to get this implemented?</p>
  <p>Using xmlcalabash in OxygenXML v23.1</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;p:declare-step xmlns:p=&quot;http://www.w3.org/ns/xproc&quot; xmlns:c=&quot;http://www.w3.org/ns/xproc-step&quot; version=&quot;1.0&quot;&gt;
  
      &lt;p:input port=&quot;source&quot; primary=&quot;true&quot;&gt;
          &lt;p:document href=&quot;my.xsd&quot;/&gt;
      &lt;/p:input&gt;
      &lt;p:output port=&quot;result&quot; primary=&quot;true&quot;/&gt;
  
      &lt;p:http-request&gt;
          &lt;p:input port=&quot;source&quot;&gt;
              &lt;p:inline&gt;
                  &lt;c:request href=&quot;https://myserver&quot; method=&quot;post&quot;&gt;
                      &lt;c:multipart content-type=&quot;multipart/form-data&quot; boundary=&quot;----12345678&quot;&gt;
                          &lt;c:body content-type=&quot;application/xml&quot; disposition='form-data; name=&quot;xsd&quot;; filename=&quot;myfile.xsd&quot;'&gt;
                          XXXX what do do here XXXX
                          &lt;/c:body&gt;
                          &lt;c:body content-type=&quot;plain/text&quot; disposition='form-data; name=&quot;arg1&quot;'&gt;4&lt;/c:body&gt;
                          &lt;c:body content-type=&quot;plain/text&quot; disposition='form-data; name=&quot;arg2&quot;'&gt;on&lt;/c:body&gt;
                 
                      &lt;/c:multipart&gt;
                  &lt;/c:request&gt;
              &lt;/p:inline&gt;
          &lt;/p:input&gt;
      &lt;/p:http-request&gt;
  
  &lt;/p:declare-step&gt;
  </code></pre>