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

Custom response status code #2285

Closed
wants to merge 3 commits into from
Closed

Custom response status code #2285

wants to merge 3 commits into from

Conversation

keinu
Copy link

@keinu keinu commented Oct 9, 2016

What did you implement:

_Implementing Issue:_ #2281

How did you implement it:

This PR makes the default 200 response as a variable that can be overridden by specifying a value in event.http.response.statusCode it will update the default response code with this setting.

How can we verify it:

When setting a custom response code such as

    events:
      - http:
          integration: lambda
          path: download/{document}
          method: get
          response:
            statusCode: 302
            headers:
              Location: "integration.response.body.url"

A get request to /download/whatevs should return a 302 HTTP code with the appropriate response value in the Location header

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config/commands/resources
  • Change ready for review message below

_Is this ready for review?:_ YES

@flomotlik
Copy link
Contributor

This was resolved with #2014 , thanks for submitting the PR

@flomotlik flomotlik closed this Oct 18, 2016
@keinu keinu deleted the custom-status-code branch October 22, 2016 08:56
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

Successfully merging this pull request may close these issues.

2 participants