Again, if you use send_request_cgi(), you can use the "basic_auth" option instead of setting the Authorization header manually.