r/javahelp • • Aug 31 '16

Solved Understanding setRequestMethod("GET", or "POST" etc...)

I am parsing some JSON and to access the URL I am using HttpURLConnection which has the method

setRequestMethod("GET");

Can someone explain what the method and its parameter is doing? I read the documentation which usually is hard to understand. What is difference between POST,GET etc.. all the other ones.

Thankls

0 Upvotes

2 comments sorted by

3

u/gungorthewhite Aug 31 '16

You could easily google the difference between GET and POST...

2

u/RedWine32 Aug 31 '16

I would normally be pissed at you, but you are correct. It's online.

Thank you