Difference between revisions of "Using cURL to troubleshoot monitors"

From Tech-Wiki
Jump to: navigation, search
Line 6: Line 6:
 
'''Example syntax for HTTP:'''
 
'''Example syntax for HTTP:'''
  
  curl http://[ip][port]/[URN]
+
  curl http://[ip][port]/[...]
  
 
'''Example syntax for HTTPS:'''
 
'''Example syntax for HTTPS:'''
  
  curl '''-k''' https://[ip][port]/[URN]
+
  curl '''-k''' https://[ip][port]/[...]
 
   
 
   
 
  -k to ignore certificate issues
 
  -k to ignore certificate issues
Line 16: Line 16:
 
'''Example to pass a host header'''
 
'''Example to pass a host header'''
  
  curl --header 'Host: [host]'  [METHOD]://[ip][port]/[URN]
+
  curl --header 'Host: [host]'  [METHOD]://[ip][port]/[...]
  
 
Additional useful option
 
Additional useful option

Revision as of 07:17, 28 June 2017

Back to Misc

cURL is a very useful tool when testing monitors

Example syntax for HTTP:

curl http://[ip][port]/[...]

Example syntax for HTTPS:

curl -k https://[ip][port]/[...]

-k to ignore certificate issues

Example to pass a host header

curl --header 'Host: [host]'  [METHOD]://[ip][port]/[...]

Additional useful option

-h for help
-v for verbosity