Change the regex to check for https as well
Change the regex to check for https as well

Also extracts out the common functionality into a separate utility method

mirkoperillo/REST-Easy,nathan-osman/REST-Easy,mirkoperillo/REST-Easy,nathan-osman/REST-Easy