How do I send http authorization header in GET request in drupal?
You can add basic authorization to url to access http basic protected address.

  // http auth
  $remote_url = 'http://uname:pw1234@example.com/service/node';