# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.


module Selenium
  module WebDriver
    module Remote
      module Http
        class Common
          MAX_REDIRECTS: Integer

          CONTENT_TYPE: String

          DEFAULT_HEADERS: Hash[String, untyped]

          BINARY_ENCODINGS: Array[Encoding]

          @common_headers: Hash[String, untyped]

          @client_config: ClientConfig

          def self.user_agent: -> String

          def self.user_agent=: (String? value) -> void

          def self.extra_headers: -> Hash[String, untyped]?

          def self.extra_headers=: (Hash[String, untyped]? value) -> void

          attr_reader client_config: ClientConfig

          def initialize: (?client_config: ClientConfig?) -> void

          def server_url=: ((String | URI)? url) -> void

          def quit_errors: () -> Array[untyped]

          def close: () -> nil

          def call: (untyped verb, untyped url, untyped command_hash) -> untyped

          private

          def common_headers: -> Hash[String, untyped]

          def server_url: () -> URI

          def request: (*untyped) -> untyped

          def create_response: (Integer code, Hash[String, untyped] body, String content_type) -> Remote::Response

          def ensure_utf8_encoding: (untyped obj) -> untyped

          def encode_string_to_utf8: (String str) -> String
        end
      end
    end
  end
end
