code: public void convertToMultipart() {
          this.method = "POST";
          
          String boundary = UUID.randomUUID().toString().replaceAll("-", "");
          setHeader("Content-Type", "multipart/form-data; boundary=----" + boundary);
          
          //add parameters, if available 
          StringBuilder bodyBuilder = new StringBuilder();
  
          for (Parameter param : parameters) {
              bodyBuilder.append("------").append(boundary).append(CRLF);
              bodyBuilder.append("Content-Disposition: form-data; name=\"").append(param.getName()).append("\"");
              if (param.getType() == IParameter.PARAM_MULTIPART_ATTR) {
                  bodyBuilder.append("; filename=\"").append(param.getFilename()).append("\"").append(CRLF);
                  bodyBuilder.append("Content-Type: ").append(param.getContentType());
              }
              bodyBuilder.append(CRLF).append(CRLF);
              
              bodyBuilder.append(param.getValue());
              bodyBuilder.append(CRLF);
          }
          bodyBuilder.append("------").append(boundary).append("--").append(CRLF);
  
          this.body = bodyBuilder.toString();
          this.parameters = new ArrayList<>();
          this.sortedParams = null;
      }
docs: Converts a GET request to a Multipart/form-data request: changes request
  method to POST, adds Content-Type/boundary header and moves any URL
  parameters to the HTTP message body, formatted as a multipart request.