lib/two_captcha/client.rb
def request(action, method = :get, payload = {})
      res = TwoCaptcha::HTTP.request(
        url: BASE_URL.gsub(':action', action),
        timeout: timeout,
        method: method,
        payload: payload.merge(key: key, soft_id: 800)
      )
      validate_response(res)
      res
    end
def request(action, method = :get, payload = {})
      res = TwoCaptcha::HTTP.request(
        url: BASE_URL.gsub(':action', action),
        timeout: timeout,
        method: method,
        payload: payload.merge(key: key, soft_id: 800)
      )
      validate_response(res)
      res
    end
def request ( action , method = :get , payload = { } ) res = TwoCaptcha :: HTTP . request ( url : BASE_URL . gsub ( ':action' , action ) , timeout : timeout , method : method , payload : payload . merge ( key : key , soft_id : 800 ) ) validate_response ( res ) res end
Perform an HTTP request to the 2Captcha API.

 @param [String] action  API method name.
 @param [Symbol] method  HTTP method (:get, :post, :multipart).
 @param [Hash]   payload Data to be sent through the HTTP request.

 @return [String] Response from the TwoCaptcha API.
Perform an HTTP request to the 2Captcha API .