.safe_get(httpObj, path, headers = nil) ⇒ Object

Does a get whether or not the connection is already open, if it wasn't
already open, will make sure to leave it closed again.

278
279
280
281
282
283
284
285

# File 'app/models/hip3/bib_searcher.rb', line 278defself.safe_get(httpObj,path,headers=nil)ifhttpObj.started?returnhttpObj.get(path,headers)else# With a block, will close the connection when we're done.
returnhttpObj.start{|h|h.get(path,headers)}endend