code: public void doPostMultipart(String path, FormDataMultiPart formDataMultiPart) throws ClientException {
          this.readLock.lock();
          try {
              ClientResponse response = getResourceWrapper()
                      .rewritten(path, HttpMethod.POST)
                      .type(Boundary.addBoundary(MediaType.MULTIPART_FORM_DATA_TYPE))
                      .post(ClientResponse.class, formDataMultiPart);
              errorIfStatusNotEqualTo(response, ClientResponse.Status.OK, ClientResponse.Status.NO_CONTENT);
              response.close();
          } catch (ClientHandlerException ex) {
              throw new ClientException(ClientResponse.Status.INTERNAL_SERVER_ERROR, ex.getMessage());
          } finally {
              this.readLock.unlock();
          }
      }
docs: Submits a multi-part form. Adds appropriate Accepts and Content Type
  headers.
  
  @param path the API to call.
  @param formDataMultiPart the multi-part form content.
  
  @throws ClientException if a status code other than 200 (OK) and 204 (No
  Content) is returned.