{"action":"created","issue":{"url":"https://api.github.com/repos/ygini/Hello-IT/issues/7","labels_url":"https://api.github.com/repos/ygini/Hello-IT/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/ygini/Hello-IT/issues/7/comments","events_url":"https://api.github.com/repos/ygini/Hello-IT/issues/7/events","html_url":"https://github.com/ygini/Hello-IT/issues/7","id":97558623,"number":7,"title":"Is the purpose of public.test.http to test connection or verify contents?","user":{"login":"brightghost","id":3108171,"avatar_url":"https://avatars.githubusercontent.com/u/3108171?v=3","gravatar_id":"","url":"https://api.github.com/users/brightghost","html_url":"https://github.com/brightghost","followers_url":"https://api.github.com/users/brightghost/followers","following_url":"https://api.github.com/users/brightghost/following{/other_user}","gists_url":"https://api.github.com/users/brightghost/gists{/gist_id}","starred_url":"https://api.github.com/users/brightghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brightghost/subscriptions","organizations_url":"https://api.github.com/users/brightghost/orgs","repos_url":"https://api.github.com/users/brightghost/repos","events_url":"https://api.github.com/users/brightghost/events{/privacy}","received_events_url":"https://api.github.com/users/brightghost/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-27T21:30:37Z","updated_at":"2015-08-03T18:34:43Z","closed_at":null,"body":"Per https://github.com/ygini/Hello-IT/wiki/public.test.http :\r\n>This function is used to check the content of a HTTP(S) web page. The aim of this function is to know if you can contact a server or not.\r\n\r\n>For example, you can add two instance of this function, one for checking access to Internet server and an other for Intranet servers.\r\n\r\nIt seems to me this is describing two cross purposes: checking *access* to an http resource, and verifying the *contents* of a resource. \r\n\r\nThe first would be equivalent to a ping; I can accomplish this with a  public.script.item, though checking for HTTP response would be a welcome alternative method.\r\n\r\nThe second seems to be what this item actually does, with any of the three options; all are comparing the content of the resource to a known-good state. This obviously works with end-points specifically designed for this purpose such as the captive.apple.com in the example; it's less useful for testing other arbitrary pages with content that periodically changes. I can achieve this with the following:\r\n\r\n     <key>mode</key>\r\n     <string>contain</string>\r\n     <key>originalString</key>\r\n     <string>*</string>\r\n\r\nbut I think that's a bit non-obvious. Perhaps another mode for just this use-case could be included?\r\n"},"comment":{"url":"https://api.github.com/repos/ygini/Hello-IT/issues/comments/127364316","html_url":"https://github.com/ygini/Hello-IT/issues/7#issuecomment-127364316","issue_url":"https://api.github.com/repos/ygini/Hello-IT/issues/7","id":127364316,"user":{"login":"brightghost","id":3108171,"avatar_url":"https://avatars.githubusercontent.com/u/3108171?v=3","gravatar_id":"","url":"https://api.github.com/users/brightghost","html_url":"https://github.com/brightghost","followers_url":"https://api.github.com/users/brightghost/followers","following_url":"https://api.github.com/users/brightghost/following{/other_user}","gists_url":"https://api.github.com/users/brightghost/gists{/gist_id}","starred_url":"https://api.github.com/users/brightghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brightghost/subscriptions","organizations_url":"https://api.github.com/users/brightghost/orgs","repos_url":"https://api.github.com/users/brightghost/repos","events_url":"https://api.github.com/users/brightghost/events{/privacy}","received_events_url":"https://api.github.com/users/brightghost/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T18:34:43Z","updated_at":"2015-08-03T18:34:43Z","body":"It does, feel free to close this. I'm a bit nonplussed by the \"test an arbitrary unlikely to change string\" method because it seems prone to fail in non-obvious ways when testing a resource which is not under your own full control (which is certainly part of my use-case). Nonetheless the function is entirely usable for my purposes, with either your method, or my method above. \r\n\r\nIf you're open to contributions to the documentation, I may elaborate a bit on this once I've had more time to explore the possibilities."}}