It seems to me that you may well be able to access the value of "batch" directly as a part of the form scope. Assuming of course you are really receiving a post request.
So you may well be able to just do:
So no need to look at the request body and no need to decode the response.