I'm doing exactly that and not running into troubles.
Could it be something about your SSL certificate? If it's not a well trusted certificate sometimes you need to install it on the client side.
Does it match the domain name you are calling?
I test my server with the following python code and I can use basic authentication with restful calls:
import requests
from requests.auth import HTTPBasicAuth
import json
passwd = 'mypassword'
r = requests.get(url, auth=HTTPBasicAuth(user, passwd))
# print r.text
# Decode the JSON response and get the access token
decodedDict = json.loads(r.text)