There are two HTTP methods to make requests: GET and POST.
With GET, the parameters are appended to the URL, after a ? and separated by &. So if you want do this with a GET request, you would have to change the URL to:
http://www.myurl.com?name=ryan&age=28 With a POST request, you send the data in the request body, which is what you seem to want to do. Here is an example of how to do a POST from Java:
http://exampledepot.com/egs/java.net/Post.html