I made the update with @phazephusion ‘s code and that fixed the error from displaying when importing media.
When I fixed the error notice, the images had already been imported, so I got the notice “already imported”. So even though I first got the wp_get_http deprecated error.
In the end, all good, thanks for the fix!