module OAuth2
  class Response
    DEFAULT_OPTIONS: Hash[Symbol, untyped]

    def self.register_parser: (Symbol key, (Array[String] | String) mime_types) { (String) -> untyped } -> void

    def initialize: (untyped response, parse: Symbol?, snaky: bool?, snaky_hash_klass: untyped?, options: Hash[Symbol, untyped]?) -> void
    def headers: () -> Hash[untyped, untyped]
    def status: () -> Integer
    def body: () -> String
    def parsed: () -> untyped
    def content_type: () -> (String | nil)
    def parser: () -> (untyped | nil)

    attr_reader response: untyped
    attr_accessor options: Hash[Symbol, untyped]
  end
end
