What I am trying to accomplish is simply using a second variable in my "scanjob" variable adding "api_tok". I am using a product that needs an api_token for every call so I just want to persistently add "api_tok" where needed. So far
auths = requests.get('http://10.0.0.127:443', auth=('admin', 'blahblah'), headers = heads)
api_tok = {'api_token=e27e901c196b8f0399bc79'}
scanjob = requests.get('http://10.0.0.127:4242/scanjob/1?%s' % (api_tok))
scanjob.url
u"http://10.0.0.127:4242/scanjob/1?set(['api_token=e27e901c196b8f0399bc79'])"
as you can see from scanjob.url, its adding a "set" after the "?". Why? If I could remove that "set" my call will work. I tried many different variants of combining a string such as:
scanjob = requests.get('http://10.0.0.127:4242/scanjob/1?%s' + api_tok)
scanjob.url
u"http://10.0.0.127:4242/scanjob/1?set(['api_token=e27e901c196b8f0399bc79'])"
scanjob = requests.get('http://10.0.0.127:4242/scanjob/1?' + str(api_tok))
scanjob.url
u"http://10.0.0.127:4242/scanjob/1?set(['api_token=e27e901c196b8f0399bc79'])"
??