updated httpRequest function to pass different addresses