Search in sources :

Example 1 with HttpPut

use of org.apache.hc.client5.http.classic.methods.HttpPut in project metrics by dropwizard.

the class HttpClientMetricNameStrategiesTest method querylessUrlAndMethodWithNameInWrappedRequest.

@Test
public void querylessUrlAndMethodWithNameInWrappedRequest() throws URISyntaxException {
    HttpRequest request = rewriteRequestURI(new HttpPut("https://thing.com:8090/my/path?ignore=this&and=this"));
    assertThat(QUERYLESS_URL_AND_METHOD.getNameFor("some-service", request), is("org.apache.hc.client5.http.classic.HttpClient.some-service.https://thing.com:8090/my/path.put-requests"));
}
Also used : HttpRequest(org.apache.hc.core5.http.HttpRequest) HttpPut(org.apache.hc.client5.http.classic.methods.HttpPut) Test(org.junit.Test)

Aggregations

HttpPut (org.apache.hc.client5.http.classic.methods.HttpPut)1 HttpRequest (org.apache.hc.core5.http.HttpRequest)1 Test (org.junit.Test)1