Fixed getPage for both https and http.