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 application/problem+json to the supported formats #758

Closed
nortonbatista opened this issue Aug 9, 2022 · 1 comment
Closed

Add application/problem+json to the supported formats #758

nortonbatista opened this issue Aug 9, 2022 · 1 comment

Comments

@nortonbatista
Copy link

Good evening!

I was using an API and the endpoint returned "application/problem+json" in the Content-Type. I had to create a custom parser
just to make HTTParty parse the response from the API.

Can you guys add this content type in the SupportedFormats?

My custom parser:

class CustomParser < HTTParty::Parser
  SupportedFormats.merge!(
    { 'application/problem+json' => :json }
  )
end
@jnunemaker
Copy link
Owner

We aren't going to add custom content types, but creating your own parser or manually adding format: :json seems right.

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

No branches or pull requests

2 participants