Class UrlConnectionSmoSearchTransport

java.lang.Object
org.apache.maven.search.backend.smo.internal.SmoSearchTransportSupport
org.apache.maven.search.backend.smo.internal.UrlConnectionSmoSearchTransport

public class UrlConnectionSmoSearchTransport extends SmoSearchTransportSupport
HttpURLConnection backed transport.
  • Constructor Details

    • UrlConnectionSmoSearchTransport

      public UrlConnectionSmoSearchTransport()
  • Method Details

    • fetch

      public String fetch(SearchRequest searchRequest, String serviceUri) throws IOException
      Description copied from class: SmoSearchTransportSupport
      This method should issue a HTTP GET requests using serviceUri and return body payload as String ONLY if the response was HTTP 200 Ok and there was a payload returned by service. In any other case, it should throw, never return null. The payload is expected to be application/json, so client may add headers to request. Also, the payload is expected to be "relatively small".
      Specified by:
      fetch in class SmoSearchTransportSupport
      Throws:
      IOException