code: private RequestBody getBody(Map<String, String> data, @Nullable Map<String, File> files, @Nullable Map<String,
              InputStream> fileStreams) throws LocalOperationException {
          MultipartBody.Builder builder = new MultipartBody.Builder().setType(MultipartBody.FORM);
  
          if (files != null) {
              for (Map.Entry<String, File> entry : files.entrySet()) {
                  File file = entry.getValue();
                  String mimeType = URLConnection.guessContentTypeFromName(file.getName());
  
                  if (mimeType == null) {
                      mimeType = "application/octet-stream";
                  }
  
                  builder.addFormDataPart(entry.getKey(), file.getName(),
                          RequestBody.create(MediaType.parse(mimeType), file));
              }
          }
  
          if (fileStreams != null) {
              for (Map.Entry<String, InputStream> entry : fileStreams.entrySet()) {
                  byte[] bytes;
                  InputStream stream = entry.getValue();
                  try {
                      bytes = new byte[stream.available()];
                      stream.read(bytes);
  
                  } catch (IOException e) {
                      throw new LocalOperationException(e);
                  }
                  builder.addFormDataPart(entry.getKey(), null,
                          RequestBody.create(MediaType.parse("application/octet-stream"), bytes));
              }
          }
  
          for (Map.Entry<String, String> entry : data.entrySet()) {
              builder.addFormDataPart(entry.getKey(), entry.getValue());
          }
  
          return builder.build();
      }
docs: Builds okhttp3 compatible request body with the data passed.
  
  @param data data to add to request body
  @param files files to upload
  @return {@link RequestBody}