Package org.eclipse.microprofile.telemetry.metrics.tck.application

# Class BasicHttpClient

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 Summary

Constructors
Constructor
Description
`BasicHttpClient(URL baseUrl)`

## Method Summary

Modifier and Type
Method
Description
`int`
`get(String path)`
Makes a GET request to a path and returns the response code
`String`
`getResponseMessage(String path)`
Makes a GET request to a path and returns the response code

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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