// 创建HttpClient对象
HttpClient httpClient = HttpClientBuilder.create().build();
// 创建HttpPost对象,设置请求URL
HttpPost postRequest = new HttpPost("https://thirdparty.example/api");
// 创建MultipartEntityBuilder
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
// 添加form-data参数
builder.addTextBody("username", "test");
builder.addTextBody("password", "123456");
// 构建HttpEntity对象
HttpEntity multipart = builder.build();
// 设置请求体
postRequest.setEntity(multipart);
// 设置Content-Type头
postRequest.setHeader("Content-Type", "multipart/form-data");
// 发送请求并获取响应
HttpResponse response = httpClient.execute(postRequest);
// 处理响应...