http: use credential API to handle proxy authentication