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

[Feature] Support create basket and configure response #86

Open
celosauro opened this issue Apr 28, 2023 · 1 comment
Open

[Feature] Support create basket and configure response #86

celosauro opened this issue Apr 28, 2023 · 1 comment
Labels
enhancement Requested feature

Comments

@celosauro
Copy link

We can provision a basket with BASKET param, but the response config is only in interface/api. To docker containers make senses configure automatically responses to a provisioned basket.

Something like:

request-baskets -basket myapi -response ./response-config.json
@darklynx
Copy link
Owner

darklynx commented May 1, 2023

This make sense, I'll think of it.

Maybe even something like this:

request-baskets -baskets ./initial-baskets.json

where initial-baskets.json can look like:

{
  "basket1": {
    "responses": {
      "GET": {
        "status": 302,
        "headers": {
          "Location": "./basket2"
        }
      }
    }
  },
  "basket2": {
    "config": {
      "forward_url": "https://my-other.service/collector",
      "proxy_response": true,
      "capacity": 500
    }
  },
  "index.html": {
    "config": {
      "capacity": 500
    },
    "responses": {
      "GET": {
        "status": 200,
        "headers": {
          "Content-Type": "application/html"
        },
        "body": "<html><body><h1>Welcome to Request Baskets</h1></body></html>"
      }
    }
  }
  ...
}

@darklynx darklynx added the enhancement Requested feature label May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requested feature
Projects
None yet
Development

No branches or pull requests

2 participants