Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no proxy support in restkit oauth? #142

Open
cwisbach opened this issue May 6, 2016 · 1 comment
Open

no proxy support in restkit oauth? #142

cwisbach opened this issue May 6, 2016 · 1 comment

Comments

@cwisbach
Copy link

cwisbach commented May 6, 2016

Hi,

I used the following sample oauth client example:

from restkit import OAuthFilter, request
import restkit.oauth2 as oauth

consumer = oauth.Consumer(key="your-twitter-consumer-key",
secret="your-twitter-consumer-secret")

request_token_url = "http://twitter.com/oauth/request_token"

auth = oauth.OAuthFilter('*', consumer)

resp = request(request_token_url, filters=[auth])
print resp.body_string()

This is working fine except when you are behind a https proxy.

I tried the following:

c = Client()
c.use_proxy = True
resp = c.request(url, filters=[auth])

But then the request class does not recognise the filters anymore.

Is it possible to override the request class to use a proxy or is there any possibility to use oauth with a proxy?

Any help would be appreciated.

Thanks,
Christian

@cwisbach cwisbach changed the title no proxy in restkit oauth? no proxy support in restkit oauth? May 6, 2016
@emilianodc
Copy link

Hi, you can change:

resp = request(request_token_url, filters=[auth])
to
resp = request(request_token_url, filters=[auth], use_proxy=True)

I know its been a while since this issue was created but maybe is helpful for someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants