copied basic code for making a http request to a php frontend