added urlConnection calls for setUseCaches, setDoInput, setDoOutput when adding a message body