added getContentType method
usage of all deprecated classes and methods removed
ssl NPE check added