Correctly process request parameters other than GET or POST, dont use gl...

...obals in the class but inject it

#8172

@tanghus please test your app against this