# module Browser::Actions

### Public Instance Methods

get(url, params = {}) click to toggle source

@param [ String ] url @param [ Hash ] params

@return [ Typhoeus::Response ]

    # File lib/common/browser/actions.rb, line 9
    def get(url, params = {})
      process(url, params.merge(method: :get))
    end

get_and_follow_location(url, params = {}) click to toggle source

@param [ String ] url @param [ Hash ] params

@return [ Typhoeus::Response ]

    # File lib/common/browser/actions.rb, line 25
    def get_and_follow_location(url, params = {})
      params[:maxredirs] ||= 2

      get(url, params.merge(followlocation: true))
    end

post(url, params = {}) click to toggle source

@param [ String ] url @param [ Hash ] params

@return [ Typhoeus::Response ]

    # File lib/common/browser/actions.rb, line 17
    def post(url, params = {})
      process(url, params.merge(method: :post))
    end

### Protected Instance Methods

process(url, params) click to toggle source

@param [ String ] url @param [ Hash ] params

@return [ Typhoeus::Response ]

    # File lib/common/browser/actions.rb, line 37
    def process(url, params)
      Typhoeus::Request.new(url, Browser.instance.merge_request_params(params)).run
    end