Question: / * * * TODO: extract the numeric 'amount' query parameter from a request, such as GET localhost: 9 0 0 0 / cats ?

/**
* TODO: extract the numeric 'amount' query parameter from a request, such as GET localhost:9000/cats?amount=50,
* returning 50.
*/
@GetMapping(value = "cats", params ={"amount"})
public int getSearchFormat(){
return 0;
}
/**
* TODO: extract the String 'format' and 'orderBy' query parameters from a request, such as
* GET localhost:9000/cats?format=gif&orderby=new, returning a String array such as {"gif", "new"}
*/
@GetMapping(value = "cats", params ={"format", "orderBy"})
public String[] getSearchFormatAndAmount(){
return null;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!