Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Latest commit

 

History

History

httpcomponents5

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

This document contains documentation for the tracee-httpcomponents5 module. Check the TracEE main documentation to get started.

tracee-httpcomponents5

Wrapper for apache http client 5+

This module contains two interceptors:

  • TraceeHttpRequestInterceptor: Implements the HttpRequestInterceptor interface to add the tracee header to the request.
  • TraceeHttpResponseInterceptor: Implements the HttpResponseInterceptor to extract the tracee header from the response.

Installation

<dependencies>
...
    <dependency>
        <groupId>io.tracee.binding</groupId>
   		<artifactId>tracee-httpcomponents5</artifactId>
        <version>${tracee.version}</version>
    </dependency>
...
</dependencies>

Then add simply two interceptors to your HttpClient of the httpcomponents module:

HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
httpClientBuilder.addInterceptorLast(new TraceeHttpRequestInterceptor());
httpClientBuilder.addInterceptorFirst(new TraceeHttpResponseInterceptor());
CloseableHttpClient httpClient = httpClientBuilder.build();