Making post request to server instead of get