http: improve helpers