cleaning up the http calls to always use the try-with-resources
statement

Reviewed-by: robert