http: simplify request creation code