http: do not use depricated API

Acked-by: Paul Millar
Target: master
Require-book: no
Require-notes: no