Performs an HTTP request, and returns a response object.

Usage example:

        def response = httpRequest 'http://localhost:8080/jenkins/api/json?pretty=true'
        println("Status: "+response.status)
        println("Content: "+response.content)
        

If Jenkins restarts after the HTTP request is made, but before the HTTP response is received, the HTTP request fails.

validResponseCodes is a comma-separated string of single values or from:to ranges. For example '200' to accept only 200 or '201,301:303' to accept 201 as well as the range from 301 to 303.

The methods of the response object are: