I wanted to check if the https://fusionhelp.oracle.com website is available or not. After going through the posts in this site, tried using the curl
script as shown below on the linux command prompt :
curl https://fusionhelp.oracle.com -L -o dumpfile -w 'Last URL was: %{url_effective}'
curl -vi -I -L --cacert FusionhelpRepository https-fusionhelp-website
FusionhelpRepository
contains the security certificates.pem merged into one file.
I get curl
: (7) socket error: 113 , instead of a status code which would suggest that the website is available. I expect the first response to be 302, after which it should get redirected to the destination page.
I'm aware that many such posts have been made earlier and the solution works for Yahoo or Google or other HTTPS website which I have been accessing. This one is not going through.
Try running wget google.com/asdf and curl google.com/asdf . curl returns EXIT_SUCCESS by default when encountering a 404 error, while wget returns EXIT_FAILURE. That's what the --spider argument is for: it makes wget return after checking for the file's existence instead of downloading it.
The syntax for the curl command is as follows: curl [options] [URL...] In its simplest form, when invoked without any option, curl displays the specified resource to the standard output. The command will print the source code of the example.com homepage in your terminal window.
To use curl to test basic network connectivity, you need to know several things: The remote server name or IP address. The protocol for the service to be tested (HTTP, FTP, SMTP, etc.) The port number for the network application you want to test.
Check a website availability with CURL Status code '200 OK' means that the request has succeeded and a website is reachable.
I think you just need the -I option here:
curl -I https://fusionhelp.oracle.com
This will give the response code, currently showing 503 Service Unavailable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With