[snowpatch] [PATCH] jenkins: refactor API HTTP GET boilerplate into new method

Russell Currey ruscur at russell.cc
Thu Jun 16 11:35:06 AEST 2016


On Thu, 2016-06-16 at 10:59 +1000, Andrew Donnellan wrote:
> All our side-effect-free Jenkins API calls follow the same pattern of
> creating a hyper Client, making a GET request to the relevant JSON API
> endpoint, and decoding the returned JSON into a JSON Object (right now the
> top-level data types are all Objects).
> 
> Refactor this boilerplate into a new method, get_api_json_object().
> 
> Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> 
> ---

While you're refactoring, can you get the Jenkins code to use the client created
in main?  This is doubly important now we have proxy support


More information about the snowpatch mailing list