Skip to content

batch requests #3

@scottcorgan

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 */
}

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