我需要使用多个参数调用Rest POST API。以下是post rest api的签名
@POST
@Consumes({"application/json" })
@Produces("application/json")
@Path("/service/postEmployeeBatch")
Response postEmployeeBatch(Employee employee, Organization org);
以下是Rest客户端代码
List<Object> providers = new ArrayList<Object>();
ObjectMapper mapper = new ObjectMapper();
JacksonJsonProvider provider = new JacksonJsonProvider();
provider.setMapper(mapper);
providers.add(provider);
WebClient client = WebClient.create("http://test.com:8080/EmployeeService", providers);
client.path("service/postEmployeeBatch/");
client.type("application/json").accept("application/json");
Employee emp = ...
Organization org = ....
//Response r = client.post(emp, org);
我不清楚如何使用多个输入参数调用WebClient.post。我很感激任何帮助或指导,