Please pass the URL parameters
the usual way instead:
Code:
params = {'api_token': 'e27e901c196b8f0399bc79'}
scanjob = requests.get('http://10.0.0.127:4242/scanjob/1', params=params)
That will work.
And as to why what you were doing did not work:
Code:
api_tok = {'api_token=e27e901c196b8f0399bc79'}
Your results show that that line creates a
set containing the string "api_token=e27e901c196b8f0399bc79". This is Python 2.7's
set initialization syntax.
What you were trying to write was:
Code:
api_tok = 'api_token=e27e901c196b8f0399bc79'
scanjob = requests.get('http://10.0.0.127:4242/scanjob/1?%s' + api_tok)
Note the removal of the curly braces.