added logic to makeRequest to detect when PUT or POST methods are being used and write the body of the request to the outputstream