adwords_api/lib/adwords_api/report_utils.rb
def make_adhoc_request(data, cid, &block)
      @api.utils_reporter.report_utils_used()
      url = @api.api_config.adhoc_report_download_url(@version)
      headers = get_report_request_headers(url, cid)
      log_request(url, headers, data)
      # A given block indicates that we should make a stream request and yield
      # the results, rather than return a full response.
      if block_given?
        AdsCommon::Http.post_stream(url, data, @api.config, headers, &block)
        return nil
      else
        response = AdsCommon::Http.post_response(
            url, data, @api.config, headers)
        log_headers(response.headers)
        check_for_errors(response)
        return response
      end
    end
def make_adhoc_request(data, cid, &block)
      @api.utils_reporter.report_utils_used()
      url = @api.api_config.adhoc_report_download_url(@version)
      headers = get_report_request_headers(url, cid)
      log_request(url, headers, data)
      # A given block indicates that we should make a stream request and yield
      # the results, rather than return a full response.
      if block_given?
        AdsCommon::Http.post_stream(url, data, @api.config, headers, &block)
        return nil
      else
        response = AdsCommon::Http.post_response(
            url, data, @api.config, headers)
        log_headers(response.headers)
        check_for_errors(response)
        return response
      end
    end
Makes request and AdHoc service and returns response.