Skip to content

batch requests #3

Description

@scottcorgan

Define batch requests for a single endpoint through the proxy. The setting in superstatic.json would be the following:

{
  "proxy": {
    "api": {
      "origin": "https://api.github.com",
      "batch": {
        "/repos/repo1/:repo1/repo2/:repo2": {
          "repo1": "/repos/:repo1",
          "repo2": "/repos/:repo2"
        }
      }
    }
  }
}

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:

{
  repo1: {/* superstatic repo data */},
  repo2: {/* divshot-cli repo data */
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions