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

Bring mocking ability to other req_perform* functions? #651

Open
sckott opened this issue Jan 23, 2025 · 9 comments
Open

Bring mocking ability to other req_perform* functions? #651

sckott opened this issue Jan 23, 2025 · 9 comments
Labels
feature a feature request or enhancement

Comments

@sckott
Copy link

sckott commented Jan 23, 2025

Of the various req_perform* functions (thinking mostly of req_perform_parallel and req_perform_connection) I think mock is only available in req_perform. Is that wrong?

Would you consider adding mocking ability (whether through a parameter or via a with handler like with_mocked_responses) to the other req_perform* functions?

Use case is so that packages like vcr, webmockr, httptest2 can hook into them

@hadley
Copy link
Member

hadley commented Jan 23, 2025

I'd consider it 😄

@sckott
Copy link
Author

sckott commented Jan 23, 2025

Thanks for considering it!

@hadley
Copy link
Member

hadley commented Jan 23, 2025

Ok, I've considered it. I've realised that I would find it personally super useful to mock req_perform_connection() because that way I could easily cache the ellmer vignettes.

@sckott
Copy link
Author

sckott commented Jan 28, 2025

Great. Let me know if I can help in any way.

@hadley
Copy link
Member

hadley commented Jan 28, 2025

Can you help by implementing it? 😄

@sckott
Copy link
Author

sckott commented Jan 30, 2025

I'll have a go at it

@hadley
Copy link
Member

hadley commented Feb 2, 2025

I’m also happy to jump on a call and brainstorm how this might work.

@sckott
Copy link
Author

sckott commented Feb 3, 2025

Sounds great. Let me get familiar with the package internals and then I'll ping you. Should I email you to schedule? Something else?

@hadley
Copy link
Member

hadley commented Feb 4, 2025

Yeah, shoot me an email and I'll send you my meeting invite link.

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

No branches or pull requests

2 participants