title: http-builder in groovy uploading multiple files in server
body: <p>I am trying to upload multiple files in a server using http builder-groovy.The below code doesn't works.Getting an error " Request entity is too large" .I have imported all the packages and defined all the variables.</p>
  
  <p>Is there any alternative for this using restclient-groovy?</p>
  
  <p>can anyone give the reason? </p>
  
  <p>thanks in advance.</p>
  
  <pre><code>def file = new File("resources/IMG.JPG")
  def file1 = new File("resources/aa.json")
  
  http = new HTTPBuilder( url )
  
  http.request (POST, JSON) { multipartRequest -&gt;
  
        uri.path = '/server/upload'
        uri.query = [param1:value, param2:value, param3:value, param4:value]
  
        requestContentType = 'multipart/form-data'
  
        MultipartEntity mpe = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE)
        mpe.addPart( "jpeg", new FileBody(( File ) file , 'image/jpeg' ))
        mpe.addPart( "json", new FileBody(( File ) file1 , 'application/json' ))
  
        multipartRequest.setEntity(mpe)
  
        response.success = { resp, json-&gt;
            println "POST response status: ${resp.statusLine}"
            println "Query response: ${json}"
        }
  
        response.failure = {  resp -&gt;
            println "POST response statusline: ${resp.statusLine}"
        }
  }
  </code></pre>