java.lang.Object
org.eclipse.microprofile.telemetry.metrics.tck.application.BasicHttpClient

public class BasicHttpClient extends Object
A really basic client for doing Http requests

For use when we don't want to use JAX-RS client or something else which has integration with telemetry

  • Constructor Details

    • BasicHttpClient

      public BasicHttpClient(URL baseUrl)
      Parameters:
      baseUrl - The base URL. Any path requested through this client will be appended to this URL. This should usually be a URL injected using ArquillianResource
  • Method Details

    • get

      public int get(String path)
      Makes a GET request to a path and returns the response code
      Parameters:
      path - the path to request, relative to the baseUrl
      Returns:
      the response code
    • getResponseMessage

      public String getResponseMessage(String path)
      Makes a GET request to a path and returns the response code
      Parameters:
      path - the path to request, relative to the baseUrl
      Returns:
      the response message