Allow POST success status codes besides 201 (CREATED)#1254
Merged
djones6 merged 3 commits intoKitura:masterfrom May 1, 2018
Merged
Allow POST success status codes besides 201 (CREATED)#1254djones6 merged 3 commits intoKitura:masterfrom
djones6 merged 3 commits intoKitura:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1254 +/- ##
==========================================
+ Coverage 89.02% 89.04% +0.02%
==========================================
Files 38 38
Lines 2286 2291 +5
==========================================
+ Hits 2035 2040 +5
Misses 251 251
Continue to review full report at Codecov.
|
2 tasks
djones6
requested changes
Apr 30, 2018
Collaborator
djones6
left a comment
There was a problem hiding this comment.
This looks good - thanks for re-working the original PR.
One thing, there is now a third variant of result handler, constructTupleArrayOutResultHandler, which should have the same change applied so that its behaviour is consistent.
djones6
approved these changes
May 1, 2018
Collaborator
djones6
left a comment
There was a problem hiding this comment.
On reflection, let's get this merged and I'll update the remaining handler in another PR.
djones6
added a commit
that referenced
this pull request
May 1, 2018
djones6
added a commit
that referenced
this pull request
May 1, 2018
and remove a redundant setting of response.status
2 tasks
djones6
added a commit
that referenced
this pull request
May 10, 2018
- and permit `nil` Codable responses when a default or custom success status is returned (building on #1254)
djones6
added a commit
that referenced
this pull request
May 30, 2018
- and permit `nil` Codable responses when a default or custom success status is returned (building on #1254)
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Allow Kitura to send any success response for a POST, not just CREATED.
This replaces #1218, and there's some discussion there.
Motivation and Context
When Kitura receives a POST, its success response is 201 (CREATED). If one explicitly specifies any other success response, such as 200 (OK), it's treated as an error.
How Has This Been Tested?
Added unit test
testCodablePostSuccessStatuses. And variations on this logic have been in use at Capital One for months.Checklist: