I am working on passing the list of from and to dates in the rest url.
For eg :
public ResponseEntity<String> periodData(
@RequestHeader(value = "Authorization") String authorization,
@PathVariable("partyGroupId") String partyGroupId,
@RequestBody DateRangeModel dateRangeModel){
return response;
}
Here is my DateRangeModel :
public class DateRangeModel {
@JsonProperty
private List<DateRange> dateRanges;
public List<DateRange> getDateRanges() {
return dateRanges;
}
public void setDateRanges(List<DateRange> dateRanges) {
this.dateRanges = dateRanges;
}
}
RequestBody :
{
"dateRanges": [
{
"fromDate": "2018-10-26",
"toDate": "2018-10-29"
},
{
"fromDate": "2018-10-21",
"toDate": "2018-10-20"
}
]
}
Could you please guide me how to pass these parameters in postman?
Thanks in advance!