Setting basic authentication credentials in WWW::Mechanize
问题 I'm having trouble using basic authentication in WWW::Mechanize. I'm trying to connect to the Streak API, the documentation for which states: Streak uses HTTP Basic Auth to sign each request with your API key. Simply set the username of the request to the API key. The password field is ignored. All requests must be made over HTTPS as HTTP requests will be ignored. Here's a sample request: curl https://www.streak.com/api/v1/pipelines -u YOUR_API_KEY: I can successfully access the API using