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

Add a way to convert HTTP methods from/to String #976

Merged
merged 2 commits into from Apr 30, 2019

Conversation

Palleas
Copy link
Contributor

@Palleas Palleas commented Apr 19, 2019

Motivation:

#701

Modifications:

  • Add init(rawValue:) to HTTPMethod
  • Add rawValue property to HTTPMethod
  • Add tests in HTTPTypesTest.swift

Result:

Users no longer have to write their own conversion methods.

@swift-nio-bot
Copy link

Can one of the admins verify this patch?

4 similar comments
@swift-nio-bot
Copy link

Can one of the admins verify this patch?

@swift-nio-bot
Copy link

Can one of the admins verify this patch?

@swift-nio-bot
Copy link

Can one of the admins verify this patch?

@swift-nio-bot
Copy link

Can one of the admins verify this patch?

@Palleas Palleas force-pushed the romain/701 branch 2 times, most recently from 6ee8874 to 4ef16ff Compare April 19, 2019 18:35
@tomerd
Copy link
Member

tomerd commented Apr 22, 2019

@swift-nio-bot test this please

@Palleas
Copy link
Contributor Author

Palleas commented Apr 22, 2019

@tomerd I reverted back to 2018 for the generated-linux tests and I'll propose a patch soon to bump all the copyrights or something like that.

@tomerd
Copy link
Member

tomerd commented Apr 22, 2019

@swift-nio-bot test this please

@weissi weissi added the 🔼 needs-minor-version-bump For PRs that when merged cause a bump of the minor version, ie. 1.x.0 -> 1.(x+1).0 label Apr 23, 2019
Copy link
Member

@weissi weissi left a comment

Choose a reason for hiding this comment

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

Thank you! I'm happy with this. Two questions for @Lukasa though:

  1. do we want the name to be rawValue?
  2. should be make the constructor fallible? Just in case someone does something clearly illegal like the empty string or something with a space. We don't even need to check the validity today but maybe we should make it fallible just so we can in the future?

Motivation:

apple#701

Modifications:

* Add `init(rawValue:)`
* Add `rawValue`
* Add tests in HTTPTypesTest.swift

Result:

Users no longer have to write their own conversion methods.
@weissi
Copy link
Member

weissi commented Apr 30, 2019

@swift-nio-bot add to whitelist

@weissi
Copy link
Member

weissi commented Apr 30, 2019

@swift-nio-bot test this please

@Lukasa Lukasa added this to the 2.1.0 milestone Apr 30, 2019
@Lukasa Lukasa merged commit 4991d09 into apple:master Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔼 needs-minor-version-bump For PRs that when merged cause a bump of the minor version, ie. 1.x.0 -> 1.(x+1).0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants