curl is the tool typically used to transfer data from or to a server, but you might want to use something else, like HTTPie, which has a very pretty color printing in the terminal.
To install HTTPie in Ubuntu or Debian:

$ apt-get install httpie

Next:

Verify that Apache works by typing http-hlocalhost.
You should see a 200OK response from Apache.

Change Apache’s port from 80 to 8080.
In Ubuntu or Debian, you do this in /etc/apache2/ports.conf and /etc/apache2/sites-enabled/000-default.conf.
In CentOS, RHEL or Fedora, edit /etc/httpd/conf/httpd.conf.

Restart Apache.
In Ubuntu or Debian type serviceapache2restart.
In CentOS, RHEL or Fedora: