WEBrick GET/POST problem

I need to write a servlet that will handle both GET and POST stuff, for
example of you were to have something like … but I
can’t figure out a way to do this. It would be nice if they would all
go into the request object.

I am used to PHP’s $_GET and $_POST so feel free to laugh at me.

Thanks