module Github::Connection

def default_options(options = {})

def default_options(options = {})
  accept = options[:headers] && options[:headers][:accept]
  {
    headers: {
      ACCEPT         =>  accept || 'application/vnd.github.v3+json,' \
                        'application/vnd.github.beta+json;q=0.5,' \
                        'application/json;q=0.1',
      ACCEPT_CHARSET => 'utf-8',
      USER_AGENT     => options[:user_agent]
    },
    ssl: options[:ssl],
    url: options[:endpoint]
  }.tap do |h|
    if type = options[:headers] && options[:headers][CONTENT_TYPE]
      h[:headers][CONTENT_TYPE] = type
    end
    h
  end
end