public HttpRequest bodyForm(@Nullable final Parameters formParams, @Nullable final String fileFormFieldName, @Nullable final String fileMediaType, @Nullable final File file) {
        this.requestBodySupplier = () -> {
            final MultipartBody.Builder entity = new MultipartBody.Builder().setType(MultipartBody.FORM);
            if (formParams != null) {
                for (final ImmutablePair<String, String> param : formParams) {
                    entity.addFormDataPart(param.left, param.right);
                }
            }
            if (file != null) {
                final MediaType mediaType = MediaType.parse(fileMediaType);
                if (mediaType == null) {
                    throw new IllegalStateException(LOGPRAEFIX + "ERR: Invalid mediaType for file " + file + ": " + fileMediaType);
                }
                entity.addFormDataPart(fileFormFieldName == null ? "file" : fileFormFieldName, file.getName(),
                        RequestBody.create(file, mediaType));
            }
            return entity.build();
        };
        return this;
    }
Sets body to Multipart-FORM, including one optional File body part.
Set "file" to null to not pass a file. If "file" is not null, then "fileMediaType" must be set as well
main/src/main/java/cgeo/geocaching/network/HttpRequest.java