curl queries
Hi,
When accessing an URL using PC browser such as IE and Chrome has no problem but when using "curl -Is https://<URL>" to access, the return is "HTTP error 405", what have I been missed out? Thanks in advance. |
Maybe something server side is causing the 405
What about with "wget"? Code:
wget -S -q -O /dev/null https://server.example.com/... Code:
curl -Is -A "Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0" https://server.example.com/... |
Hi,
The wget works but not sure why when I used "wget -S -q -O /dev/null https://server.example.com/... | grep 200" (This is to verify that the URL is working with the return of "HTTP/1.1 200 OK" by grep) it does not work as expected though the return of the command display on screen consists of "HTTP/1.1 200 OK"? If I output the result to a file (-O /tmp/file), the content of the file is not the same as display on screen? |
The headers are sent to stderr instead, so you have to redirect them to stdout if you want to filter them with "grep"
Code:
wget -S -q -O /dev/null https://server.example.com/ 2>&1 | grep 200 |
All times are GMT -5. The time now is 09:08 AM. |