Skip to content

Feature Proposal: Raise on some HTTP status codes #454

@dccunha

Description

@dccunha

I would like if HTTParty throw an exception on some HTTP status codes. I thought in an option that would turn this feature on and define what status codes would throw exceptions.

Something like this:

class Foo
  include HTTParty
  raises_on status_codes: (400..599).to_a
end

What do you think of this? Can I send a pull request following this idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions