replace https with http to use the same request function