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

Fixed REST client failing on POST and 201 status code. #806

Merged
merged 1 commit into from
Sep 3, 2014
Merged

Fixed REST client failing on POST and 201 status code. #806

merged 1 commit into from
Sep 3, 2014

Conversation

yglukhov
Copy link

@yglukhov yglukhov commented Sep 3, 2014

No description provided.

/**
Determines if status code is generally successful (>= 200 && < 300)
*/
bool isGenerallySuccessful(int status) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to name it isSuccessCode (to match RFC naming of 2xx block) and take HTTPStatus argument as opposed to raw int.

@yglukhov
Copy link
Author

yglukhov commented Sep 3, 2014

Fixed and squashed.

@s-ludwig
Copy link
Member

s-ludwig commented Sep 3, 2014

Thanks, merging in. In theory this test could be a bit too lax (e.g. when more exotic status codes, such as 207 Multi-Status are returned), but it's definitely less problematic than the current too strict solution and it's unlikely to cause any real issues practice, so it looks good after all.

s-ludwig added a commit that referenced this pull request Sep 3, 2014
Fixed REST client failing on POST and 201 status code.
@s-ludwig s-ludwig merged commit 9f6add4 into vibe-d:master Sep 3, 2014
@yglukhov
Copy link
Author

yglukhov commented Sep 3, 2014

Thanx!

@yglukhov yglukhov deleted the rest-status-code-fix branch September 3, 2014 08:53
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.

None yet

3 participants