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

Batch up multiple requests in a single network call #471

Closed
rafasashi opened this issue Jun 10, 2016 · 3 comments
Closed

Batch up multiple requests in a single network call #471

rafasashi opened this issue Jun 10, 2016 · 3 comments
Labels

Comments

@rafasashi
Copy link
Contributor

I am using simultaneous HTTP requests in PHP with cURL to request multiple APIs in parallel.

I would like to get the options provided by the function request()in order to input them somewhere else.

Is it possible to do that without changing the source?

If not, could we work on some solution to batch up several requests to be sent in a single network call like google does here: https://developers.google.com/api-client-library/php/guide/batch

@abraham abraham added the Explore label Jul 3, 2016
@abraham
Copy link
Owner

abraham commented Jul 3, 2016

Twitter doesn't support batching multiple requests together in a single connection like Google APIs does. The best that could be done would be to queue up several requests and make them in parallel. I haven't yet looked into how much work this would be to add.

@rafasashi
Copy link
Contributor Author

rafasashi commented Jul 3, 2016

Thanks for your answer Abraham.

Here comes my implementation of curl_multi_exec for you

https://gist.github.com/rafasashi/ec8fa63155c1990e81f889cc3a053a0c

You can do GET or POST requests within the same call.

Let me know if I can help you.

@abraham abraham added this to the v2.0 milestone Feb 23, 2017
@abraham abraham removed this from the v2.0 milestone Jul 3, 2018
@abraham
Copy link
Owner

abraham commented Jul 24, 2023

TwitterOAuth is in maintenance mode and major improvements are no longer planned. #1188

@abraham abraham closed this as completed Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants