Use GET by default (as the javadoc specifies). Some API's do not accept POST requests for authorization. Added method to change the requestMethod if needed.