check content-type return of an http test - BB Custom Topics A - D - Big Brother - Dell Community

check content-type return of an http test

Big Brother

Big Brother
Access more than 800 custom test extensions to share or use in resolving your IT challenges.

check content-type return of an http test

This question has been answered by robert.croteau

I have a web service I want to query to determine if it is up and returning images as expected. Apparently the HTTP status is set to 200 even if the image is not being returned for some reason. The web service returns an xml doc instead with details of what was wrong with the request. Can I tell the http check to somehow look at the content-type in the HEAD output and alert if it's not "image/*"? As I'm typing this, I'm thinking I'll have to use/write a custom monitor, if that's the case, can anyone point me to an existing custom that would fill in nicely here?

Verified Answer
  • Is the URL given static or dynamic? If you can, try to specify a static URL of an image

    In any case, look at the contributions on this site (maybe in the WWW/HTTP/FTP section) , you may find somthing similar to what you aim to do.

All Replies
  • Is the URL given static or dynamic? If you can, try to specify a static URL of an image

    In any case, look at the contributions on this site (maybe in the WWW/HTTP/FTP section) , you may find somthing similar to what you aim to do.

  • I'm not much of a web services expert. When I make the request for the image, I can get multiple responses back (image not available, here's your image, auth error, etc...), so I think that means it's dynamic. The problem is, each response seems to have an HTTP 200 status message regardless unless the web service is down entirely. I'll take a look at some of the link you suggest to see if anything jumps out at me.