Code example for HttpURLConnection

Methods: addRequestProperty, setConnectTimeout, setDoInput, setDoOutput, setReadTimeout, setRequestMethod