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

Session baseUrl? #4721

Closed
NoahCardoza opened this issue Jul 4, 2018 · 4 comments
Closed

Session baseUrl? #4721

NoahCardoza opened this issue Jul 4, 2018 · 4 comments

Comments

@NoahCardoza
Copy link

"Requests is not accepting feature requests at this time." I see.

But really guys, would it be too much to ask to get this implemented into the Sessions? I could submit a PR. Axios and many other libraries support this already, and it comes it really handy.

I know there are workarounds, subclass it and what not but that is so ugly when it could be built into the module with ~5 lines of code.

Please 💯
Thanks

@sigmavirus24
Copy link
Contributor

In the future, please search closed and open issues before creating new ones that are duplicates.

@NoahCardoza
Copy link
Author

NoahCardoza commented Jul 4, 2018

I am aware there have been previous requests, but obviously, they haven't been answered... Hence me opening a new issue.

There wasn't even a discussion, that thread was killed instantly, kind of like this one.

I get that hooks can be used, but It seems like baseUrl would be much cleaner and much more readable.

Actually, after further testing it, hooks cannot be used like in the above issue. From what I have seen, you now can only hook the response, but not the args.

http://docs.python-requests.org/en/master/user/advanced/#event-hooks

@nateprewitt
Copy link
Member

Hi @NoahCardoza, I believe what @sigmavirus24 is pointing out is that we've already done the work for this and it's freely available in the Requests toolbelt as detailed in those other issues.

We cannot feasibly support every possible knob and whistle people want in Requests, so we provided the ability to either implement them yourself, or use our implementations of them in the toolbelt. We have dozens of messages discussing this topic, so I'm not sure what you feel is unanswered here.

@sigmavirus24
Copy link
Contributor

Further, there's more than just one issue discussing this. Others have had full discussions. You're not so special as to receive that precious time of mine or Nate's to have another full discussion.

@psf psf locked as resolved and limited conversation to collaborators Jul 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants