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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get json content type for custom content types #297

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

ggsalas
Copy link
Contributor

@ggsalas ggsalas commented Mar 13, 2024

I have found a bug using the contentful api. This api returns this content type:

Content-Type: application/vnd.contentful.delivery.v1+json

Currently the content type is vnd instead of json.

I have added this fix, but I think can be improved extending to all the content types this plugin want to support, probably are only 3: json, html and txt. let me know what you think, and thanks for this great plugin 馃帀

Copy link
Member

@NTBBloodbath NTBBloodbath left a comment

Choose a reason for hiding this comment

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

Hey, thank you so much for this patch!

I think can be improved extending to all the content types this plugin want to support, probably are only 3: json, html and txt.

Of course, in fact, I think this little bottleneck was already or can be easily fixed in the development branch (which is rest.nvim's v2, that is close to release) thanks to depending on mimetypes.lua and some Lua pattern matching :)

@NTBBloodbath NTBBloodbath merged commit 91badd4 into rest-nvim:main Mar 15, 2024
2 checks passed
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

2 participants