Skip to content

Allow POST success status codes besides 201 (CREATED)#1218

Closed
c1ira wants to merge 1 commit intoKitura:masterfrom
c1ira:master
Closed

Allow POST success status codes besides 201 (CREATED)#1218
c1ira wants to merge 1 commit intoKitura:masterfrom
c1ira:master

Conversation

@c1ira
Copy link
Copy Markdown
Contributor

@c1ira c1ira commented Feb 7, 2018

Allow POST success status codes besides 201 (CREATED)

Description

This change allows Kitura to send any success response for a POST. This is dependent on a change in Kitura-net: Kitura/Kitura-net#240 . This will fail to build unless/until the Kitura-net PR dependency is resolved.

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), Kitura treats it like an error.

How Has This Been Tested?

Ran swift test.
Have been using this modification at Capital One for several months.

Checklist:

  • [x ] I have submitted a CLA form
  • If applicable, I have updated the documentation accordingly.
  • If applicable, I have added tests to cover my changes.

…f one explicitly specifies any other success response, such as 200 (OK), Kitura treats it like an error.

This change along with a dependent change in Kitura-net allow Kitura to send any success response for a POST.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 7, 2018

CLA assistant check
All committers have signed the CLA.

@djones6
Copy link
Copy Markdown
Collaborator

djones6 commented Mar 13, 2018

Note that this would need reworking due to conflict with recent changes:

I believe it would involve applying this logic to the CodableHelpers.constructOutResultHandler function.

@c1ira
Copy link
Copy Markdown
Contributor Author

c1ira commented Mar 13, 2018

@djones6 Unless you object, I'd like to close this PR and revisit when the dust has settled on #1222, #1214 and Kitura/Kitura-net#246.

@c1ira
Copy link
Copy Markdown
Contributor Author

c1ira commented Mar 14, 2018

Will create new PR after dust has settled on #1222, #1214 and Kitura/Kitura-net#246.

@c1ira c1ira closed this Mar 14, 2018
@ianpartridge
Copy link
Copy Markdown
Collaborator

@c1ira the dust has settled 🙂 Would you be willing to pick this up again?

@c1ira
Copy link
Copy Markdown
Contributor Author

c1ira commented Apr 12, 2018

@ianpartridge Yes, thanks for poking me.

@c1ira
Copy link
Copy Markdown
Contributor Author

c1ira commented Apr 20, 2018

@ianpartridge Replacement PR is: #1254

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.

4 participants