Use a set shell commands together with executeCommandLine to return the status code.
Or have a look at e.g. this thread Get http status code when using sendHttpGetRequest in rule
Have you had a look into Actions | openHAB if that already covers your requirements ?