I seem to be stuck in authenticating my credentials for a RESTful call with emc vplex
I am just a beginner in python, any suggestions would be helpful.
import requests,json
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
query_headers = {'content-type': 'application/json', 'accept':
'application/json', 'auth':('username', 'password')}
test=requests.get('https://190.xx.xx.xx/vplex/cluster-
contexts',verify=False,headers=query_headers)
print test
So when i pass in the correct credentials in auth i get output as Response [401]
,Error 401 means my authentication has failed, not sure if i am passing it correctly in the dictionary.
authorizationor it has to use string'username:password'encoded in base64.requestsmay use argumentauth=