Add MIME::MediaType#7077
Merged
sdogruyol merged 2 commits intoJan 10, 2019
Merged
Conversation
ghost
suggested changes
Nov 13, 2018
Sija
reviewed
Nov 14, 2018
fd7b793 to
e01f1aa
Compare
RX14
requested changes
Nov 22, 2018
Sija
reviewed
Nov 26, 2018
| # A MediaType describes a MIME content type with optional parameters. | ||
| struct MediaType | ||
| property media_type : String | ||
| property params : Hash(String, String) |
Contributor
There was a problem hiding this comment.
Why? Having access to raw params Hash could come handy, when removed there's no way to do that.
Member
Author
There was a problem hiding this comment.
MediaType directly exposes #[], #[]?, #fetch, #[]= and #each_parameter. Why would yo need direct access to params?
Contributor
There was a problem hiding this comment.
For serialization as an example.
Member
Author
There was a problem hiding this comment.
What kind of serialization? I figure you'd either serialize with #to_s or directly access the ivar @params.
ffb4b52 to
da6ce50
Compare
Sija
reviewed
Nov 27, 2018
Sija
reviewed
Nov 28, 2018
90de96c to
92d2b18
Compare
Member
Author
|
@RX14 I removed |
92d2b18 to
3663040
Compare
RX14
requested changes
Dec 7, 2018
RX14
reviewed
Dec 14, 2018
RX14
approved these changes
Dec 16, 2018
RX14
reviewed
Dec 16, 2018
ghost
suggested changes
Dec 16, 2018
sdogruyol
approved these changes
Dec 18, 2018
Member
sdogruyol
left a comment
There was a problem hiding this comment.
Finally, thank you @straight-shoota 👍
RX14
requested changes
Dec 19, 2018
RX14
approved these changes
Dec 20, 2018
Member
|
Squash please! |
c083d5f to
623ffca
Compare
623ffca to
f4f1151
Compare
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.
This PR adds a
MIME::MediaTypetype with methods for parsing mime media types as per RFC 2045 and RFC 2046 including support for optional parameters.This type is put to use for reading and writing HTTP
Content-Typeheaders andHTTP::Multipartboundaries replacing existing incomplete implementations.This is not directly integrated with the
MIMEregistry (added in #5765) but can be optionally used together.Closes #5686