Query HTTP server


is there any way in bash to query the round trip time to a http server? I have to use the http protocol so ping is no good.  I have to compare this to ping. I thought wget might have something but I couldn't find what to use.

Who is Participating?
asbharadwajConnect With a Mentor Commented:
Well Yes
It can be done in Perl
Im a beginner in Perl and I dont know much about it and
Im much more comfortable with C.
However a good starting point will be

Its a brief overview of various capabilities of Perl. Iam using this for Perl basics :-)
Iam not aware of any bash command for this purpose. But
You can write a small program that sends a HTTP Get request to the server
and measures the response time
Its really very simple
All you need to do is open a socket, connect to the server port 80 (or whatever the
server is listening to), note the time, send the http get request, wait for response,
note down time, calculate difference and you have the round trip time.
PaulmulAuthor Commented:
Can this be done in perl?  I am using perl and bash for this.
PaulmulAuthor Commented:
I am also quite new to perl, I prefer it to C though
try curl, works great.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.