Interface FrankfurterExchangeRates.Fetcher

Enclosing class:
FrankfurterExchangeRates
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface FrankfurterExchangeRates.Fetcher
Fetches a URL's body; injectable so tests never reach the internet.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(URI uri)
     
  • Method Details

    • get

      String get(URI uri) throws Exception
      Parameters:
      uri - the URL
      Returns:
      the response body
      Throws:
      Exception - on any failure (treated as "live rates unavailable")