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

Allow custom xml and json content types #76

Merged
merged 3 commits into from
Jul 29, 2017
Merged

Allow custom xml and json content types #76

merged 3 commits into from
Jul 29, 2017

Conversation

goughy000
Copy link
Contributor

As per RFC7303 and similar for json this PR allows usage of headers such as

application/xml
application/xml;charset=UTF-8
application/vnd.com.whatever+xml
application/json
application/json;charset=UTF-8
application/vnd.com.whatever+json

to fall into the JSON and XML matching methods

@codecov-io
Copy link

codecov-io commented Jul 28, 2017

Codecov Report

Merging #76 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   98.95%   98.96%   +<.01%     
==========================================
  Files          35       35              
  Lines        1057     1062       +5     
  Branches      175      177       +2     
==========================================
+ Hits         1046     1051       +5     
  Misses          4        4              
  Partials        7        7
Impacted Files Coverage Δ
.../github/azagniotov/stubby4j/stubs/StubMatcher.java 98.83% <100%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7394e77...895ff9e. Read the comment docs.

@azagniotov
Copy link
Owner

Thanks! I will look into this ASAP!

@goughy000
Copy link
Contributor Author

Thanks! Although thinking about it maybe it would be better to just match like \/(?:.*\+)?(\w*);? and then check if the group is "json" or "xml"
What do you think?

@azagniotov azagniotov merged commit b5b7eeb into azagniotov:master Jul 29, 2017
@goughy000 goughy000 deleted the feature/content-type-suffix branch July 29, 2017 19:16
azagniotov added a commit that referenced this pull request Jul 29, 2017
- PRs: #71, #73 and #76
- Upgraded Jetty binaries
- Updated the README
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.

3 participants