-
Notifications
You must be signed in to change notification settings - Fork 7
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 requests #3
Comments
Rather than force the configuration to pre-suppose all possible batching, I think it makes more sense to supply a more generic batching endpoint:
{
value1: {/* superstatic repo data */},
value2: {/* divshot-cli repo data */}
} |
Nice. Any particular reason you put "batch" before "api"? I was thinking:
|
It's before api to reduce ambiguity. with
It is ambiguous whether you want to request a batch of urls, or have a request proxied to github that has a path of |
Makes sense. Do you think that would cause any issues if the batched urls contain query parameters themselves? |
That I'm not sure, seems like it could cause trouble if the urls coming in also have commas in them. |
We could require that batch parts that have commas in the url be escaped
Then we can just split the batch by ',' and unescape. Most users wouldn't have to do the escaping as commas and urls are rare, but it would let us support it. |
Define batch requests for a single endpoint through the proxy. The setting in superstatic.json would be the following:
Ultimately the user can still make normal proxy requests, but normal requests that match the batch route would be be considered a batch request and handled accordingly.
The above example would return the follow for the request
/repos?repo=superstatic&repo2=divshot-cli
in the response:The text was updated successfully, but these errors were encountered: