Android中的HttpsURLConnection身份验证问题

I am attempting to authenticate from the android app. It is an apache basic auth. It seems, through error logs, that the webpage is taking what is after the URL as the username for some reason? Any thoughts on this? Here is my code:

URL url = new URL("https://website.com/");
            HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
            connection.setSSLSocketFactory(context.getSocketFactory());
            connection.setRequestProperty("Authorization", "Basic " +
                    Base64.encode("user:pass".getBytes(), Base64.NO_WRAP));
            connection.setDoOutput(true);
            connection.connect();

If i add a path the the website, it tells me that that path is not a user. Without a path it says that "/" is not a user.

I have also tried doing user:pass@website.com which didn't work either.