Reputation: 811
I have below API to be tested. Not getting solution to pass string array to requestors. Tried with comma seperated values, values with in [] etc.
@RequestMapping(value = "/v10/{user}/alerts/alertguids/{requestors}", method = RequestMethod.GET)
@ResponseBody
@ResponseStatus(HttpStatus.OK)
public String[] retrieveRunnableAlertGuidsByRequestors(@RequestParam(value = "productId") final String productId,
@PathVariable final String[] requestors)
Upvotes: 0
Views: 1647
Reputation: 2098
I'm not sure with @PathVariable but you can use the @RequestParam.
eg:
@RequestMapping(value = "/v10/{user}/alerts/alertguids/{requestors}", method = RequestMethod.GET)
@ResponseBody
@ResponseStatus(HttpStatus.OK)
public String[] retrieveRunnableAlertGuidsByRequestors(@RequestParam(value = "productId") final String productId,
@RequestParam(value = "param[]") final String[] requestors)
Upvotes: 1