The regulated release of gastric acid induced by the interaction of histamine with H2 type receptor receptors with subsequent activation of adenylate cyclase and elevation of intracellular cyclic AMP.