lib/sous_vide/outputs/json_http.rb
# Provides access to Net::HTTP client object. Use it to enable SSL or pass your own client.
# @return [Net::HTTP]
Provides access to Net::HTTP client object. Use it to enable SSL or pass your own client.
Provides access to Net :: HTTP client object . Use it to enable SSL or pass your own client .
def call_with_retries(nethttp_request)
        begin
          @http_client.request(nethttp_request)
        rescue
          if @retry < @max_retries
            logger.warn("Request failed, retry #{@retry} of #{@max_retries}.")
            @retry += 1
            sleep 2
            retry
          else
            logger.error("Request failed, retry #{@retry} of #{@max_retries}. Abort.")
            raise
          end
        end
      end
def call_with_retries ( nethttp_request ) begin @http_client . request ( nethttp_request ) rescue if @retry < @max_retries logger . warn ( "Request failed, retry #{@retry} of #{@max_retries}." ) @retry += 1 sleep 2 retry else logger . error ( "Request failed, retry #{@retry} of #{@max_retries}. Abort." ) raise end end end
Provides access to Net::HTTP client object.
Provides access to Net :: HTTP client object .
None
Net::HTTP
nethttp_request
<not_specific>