public MultipartBody field(String name, Collection<?> value) { MultipartBody body = new MultipartBody(this).field(name, value); this.body = body; return body; }
public MultipartBody field(String name, File file, String contentType) { MultipartBody body = new MultipartBody(this).field(name, file, contentType); this.body = body; return body; }
public MultipartBody field(String name, Object value, String contentType) { MultipartBody body = new MultipartBody(this).field(name, (value == null) ? "" : value.toString(), contentType); this.body = body; return body; }
public MultipartBody fields(Map<String, Object> parameters) { MultipartBody body = new MultipartBody(this); if (parameters != null) { for (Entry<String, Object> param : parameters.entrySet()) { if (param.getValue() instanceof File) { body.field(param.getKey(), (File) param.getValue()); } else { body.field(param.getKey(), (param.getValue() == null) ? "" : param.getValue().toString()); } } } this.body = body; return body; }
public MultipartBody field(String name, InputStream stream, ContentType contentType, String fileName) { InputStreamBody inputStreamBody = new InputStreamBody(stream, contentType, fileName); MultipartBody body = new MultipartBody(this).field(name, inputStreamBody, true, contentType.toString()); this.body = body; return body; }
public MultipartBody field(String name, Object value, String contentType) { MultipartBody body = new MultipartBody(this).field(name, (value == null) ? "" : value.toString(), contentType); this.body = body; return body; }
public MultipartBody field(String name, Collection<?> value) { MultipartBody body = new MultipartBody(this).field(name, value); this.body = body; return body; }
public MultipartBody field(String name, File file, String contentType) { MultipartBody body = new MultipartBody(this).field(name, file, contentType); this.body = body; return body; }
public MultipartBody field(String name, org.springframework.web.multipart.MultipartFile file, String contentType) { MultipartBody body = new MultipartBody(this).field(name, file, contentType); this.body = body; return body; }
public MultipartBody field(String name, File file, String contentType) { MultipartBody body = new MultipartBody(this).field(name, file, contentType); this.body = body; return body; }
public MultipartBody field(String name, Collection<?> value) { MultipartBody body = new MultipartBody(this).field(name, value); this.body = body; return body; }
public MultipartBody fields(Map<String, Object> parameters) { MultipartBody body = new MultipartBody(this); if (parameters != null) { for (Entry<String, Object> param : parameters.entrySet()) { if (param.getValue() instanceof File) { body.field(param.getKey(), (File) param.getValue()); } else { body.field(param.getKey(), (param.getValue() == null) ? "" : param.getValue().toString()); } } } this.body = body; return body; }
public MultipartBody fields(Map<String, Object> parameters) { MultipartBody body = new MultipartBody(this); if (parameters != null) { for (Entry<String, Object> param : parameters.entrySet()) { if (param.getValue() instanceof File) { body.field(param.getKey(), (File) param.getValue()); } else if (param.getValue() instanceof org.springframework.web.multipart.MultipartFile) { body.field(param.getKey(), (org.springframework.web.multipart.MultipartFile) param.getValue()); } else { body.field(param.getKey(), (param.getValue() == null) ? "" : param.getValue().toString()); } } } this.body = body; return body; }
public MultipartBody field(String name, Object value, String contentType) { String value1 = ValueUtils.processValue(value); MultipartBody body = new MultipartBody(this).field(name, value1, contentType); this.body = body; return body; }
public MultipartBody field(String name, InputStream stream, ContentType contentType, String fileName) { InputStreamBody inputStreamBody = new InputStreamBody(stream, contentType, fileName); MultipartBody body = new MultipartBody(this).field(name, inputStreamBody, true, contentType.toString()); this.body = body; return body; }
public MultipartBody field(String name, InputStream stream, ContentType contentType, String fileName) { InputStreamBody inputStreamBody = new InputStreamBody(stream, contentType, fileName); MultipartBody body = new MultipartBody(this).field(name, inputStreamBody, true, contentType.toString()); this.body = body; return body; }