I used this in postman and it is working
?order_by=[{“field”:“created_at”,“desc”:true}]
But in Katalon is not. And i don’t know why Katalon remove the character " automatically when i save this request. Can someone help me ?
Your problem is the “[” and “]” characters - they are not allowed in that part of a URI.
A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets (“[” and “]”). This is the only place where square bracket characters are allowed in the URI syntax.
RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax
If you think that any other system mysteriously allows such illegal characters, it is likely because that system is percent-encoding the URI before transmission.
@ThanhTo @duyluong Can you guys comment further on Katalon’s abilities in this regard?
Separate with commas:
http://localhost:8080/MovieDB/GetJson?name=Actor1,Actor2,Actor3&startDate=20120101&endDate=20120505
or:
http://localhost:8080/MovieDB/GetJson?name[0]=Actor1&name[1]=Actor2&name[2]=Actor3&startDate=20120101&endDate=20120505
Either way, your method signature needs to be:
@RequestMapping(value = “/GetJson”, method = RequestMethod.GET)
public void getJson(@RequestParam(“name”) String[] ticker, @RequestParam(“startDate”) String startDate, @RequestParam(“endDate”) String endDate) {
//code to get results from db for those params.
}