문제

account_summary_API_url = "https://rest.developer.yodlee.com/services/srest/restserver/v1.0/account/summary/all"

account_summary_params = urllib.urlencode({'cobrandSessionToken':cobSessionToken,'userSessionToken':userSessionToken})

account_summary_response = urllib.urlopen(account_summary_API_url,account_summary_params).read()

I am using above url then encoded params to call the API but this API needs to be called with GET method . How do I enforce that ?

도움이 되었습니까?

해결책

urllib.urlopen("http://yoururl.com/?%s" % your_url_encoded_params)

Passing the params by way of the url makes this a GET request.

So:

account_summary_response = urllib.urlopen("%s?%s" % (account_summary_API_url,account_summary_params)).read()
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top