You can use this code to parse arguments in GET request. In POST requests send data as JSON and parse it to the arguments class you had were using before.