Pull out HTTP object building into own method