replace http api call by https