@Test public void requestPostConstruct_contentType() throws Exception { MultipartRequest.Builder<DummyResponse> builder = new MultipartRequest.Builder<>(Request.Method.POST, url, DummyResponse.class); builder.json(dummyRequestObject); builder.headers(headers); builder.multiPartDataList(dummyDataMap); MultipartRequest<DummyResponse> baseRequest = builder.build(); assertTrue(baseRequest.getBodyContentType().startsWith("multipart/form-data;boundary=")); assertNotEquals("multipart/form-data;boundary=", baseRequest.getBodyContentType()); assertNotNull(baseRequest.getBody()); }
@Override @NonNull public String getBodyContentType() { return "multipart/form-data;boundary=" + boundary; }
MultipartRequest extends BaseRequest<T> { @Override @NonNull public String getBodyContentType() { return "multipart/form-data;boundary=" + boundary; } }
MultipartRequest extends BaseRequest<T> { @Override @NonNull public String getBodyContentType() { return "multipart/form-data;boundary=" + boundary; } private  MultipartRequest(Builder<T> builder); }
MultipartRequest extends BaseRequest<T> { @Override @NonNull public String getBodyContentType() { return "multipart/form-data;boundary=" + boundary; } private  MultipartRequest(Builder<T> builder); @Override @NonNull String getBodyContentType(); @Nullable HashMap<String, List<RequestData>> getMultiPartData(); @NonNull String getJsonKey(); }
MultipartRequest extends BaseRequest<T> { @Override @NonNull public String getBodyContentType() { return "multipart/form-data;boundary=" + boundary; } private  MultipartRequest(Builder<T> builder); @Override @NonNull String getBodyContentType(); @Nullable HashMap<String, List<RequestData>> getMultiPartData(); @NonNull String getJsonKey();  }