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

Allow success response codes to be specified in HTTP Action's config #132

Open
marcinus opened this issue Mar 17, 2020 · 0 comments
Open

Comments

@marcinus
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Sometimes 404 or 301 response code is considered successful for an unusual endpoint.
It's possible that only 200 response is expected and 204 should be rejected.
Currently, _success transition is returned from HttpAction whenever response code is between 200 and 300.

Describe the solution you'd like
Configurable _success response codes, e.g.:

get {
      factory = http
      config.endpointOptions {
          path = /service/mock/get.json
          domain = localhost
          port = ${test.random.service.port}
          successStatusCodes = "200,300-400"
        }
}

or provided in a different format. Interval support would be appreciated.

Describe alternatives you've considered
Currently no good alternative. Subsequent _success or _error action has to handle the ambiguity.

Additional context
Desired behaviour could be achieved if #128 was implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant