anchor.diff:      );
   }
   ----
  -<1> Our interface need to extend `org.talend.sdk.component.api.service.http.HttpClient`
  -to be known as an http client by the component framework.
  -This interface also provides `void base(String base)` method that will let us set the base uri for the http request. In our case, it will be the Zendesk instance url.
  -<2> `@Request` annotation let us define two things. the http request path and method (`GET`, `POST`, `PUT`,...).
  -<3> At this line we have two important things. The method return type and a header param. At this point we will explain the method return
  -that is of type `Response<JsonObject>`. The `Response` object let us access
  -to the http response status code, headers, error payload and the response body that will be of type `JsonObject` here.
  -The response body will be decoded according to the content type returned by the API. The component framework provides codec for json content.
  -If you want to consume specific content type, you will need to provide your personalized codec using the `@Codec` annotation.
  -<4> We define the `Authorization` http request header that will let us provide the authorization token.
  -<5> We define another http request header to provide the content type.
  -<6> We define the query parameters using the `@Query` annotation that will provide the parameter name.
  -
  -And that all what we need to do to create our http client. No implementation is needed for the interface,
  -as it will be provided by the component framework according to what we have defined.
  -
  -TIP: This http client can be injected into a mapper or a processor to perform http requests.
  -
  -== Component Configuration
  -NOTE: For the sake of simplicity, we will use the basic authentication supported by the API.
  -
  -Let's start setting up the configuration for the basic authentication.
  -To be able to consume the Search API, we will need to provide the Zendesk instance URL, the username and the password.
  +<1> The interface needs to extend `org.talend.sdk.component.api.service.http.HttpClient` to be recognized as an HTTP client by the component framework.
  +This interface also provides the `void base(String base)` method, that allows to set the base URI for the HTTP request. In this tutorial, it is the Zendesk instance URL.
  +<2> The `@Request` annotation allows to define the HTTP request path and method (`GET`, `POST`, `PUT`, and so on).
  +<3> The method return type and a header parameter are defined. +
  +The method return type is a JSON object: `Response<JsonObject>`. The `Response` object allows to access the HTTP response status code, headers, error payload and the response body that are of the `JsonObject` type in this case. +
  +The response body is decoded according to the content type returned by the API. The component framework provides the codec to decode JSON content. +
  +If you want to consume specific content types, you need to specify your custom codec using the `@Codec` annotation.
  +<4> The `Authorization` HTTP request header allows to provide the authorization token.
  +<5> Another HTTP request header defined to provide the content type.
  +<6> Query parameters are defined using the `@Query` annotation that provides the parameter name.
  +
  +No additional implementation is needed for the interface, as it is provided by the component framework, according to what is defined above.
  +
  +TIP: This HTTP client can be injected into a mapper or a processor to perform HTTP requests.
  +
  +== Configuring the component
  +This example uses the basic authentication that supported by the API.
  +
  +=== Configuring basic authentication
  +The first step is to set up the configuration for the basic authentication.
  +To be able to consume the Search API, the Zendesk instance URL, the username and the password are needed.
   
   [source,java,indent=0,subs="verbatim,quotes,attributes",]
   ----
  
positive.code:     private final String sortOrder;
  }
  ----
  <1> This mark this configuration class as a `DataSet` type.
  xref:component-configuration.adoc#_marking_a_configuration_as_a_particular_type_of_data [Read more about configuration type].
  <2> The UI layout of this configuration.
  <3> We bind a text area widget to the search query field. xref:gallery.adoc[See all the available widgets].
  <4> Note the usage of `@Documentation` annotation. this annotation let us document our component (configuration in this scope).
  There is a Talend component maven plugin that can be used to generate the component documentation with all the configuration description and the default values.
  <5> Here we give the field a default value.
  
  That's all for the configuration part. Let's create the component logic.
  
  == The component mapper
  NOTE: We will not split the http calls on many workers. so our mappers will not implement the split part.
  [source,java,indent=0,subs="verbatim,quotes,attributes",]
  ----
  @Version
  
negative.code: }
  ----
  <1> The component configuration injected from the component mapper.
  <2> The HTTP client injected from the component mapper.
  <3> A utility used to buffer search results and iterate on them one after another.
  <4> The record buffer is initialized with the `init` by providing the logic to iterate on the search result. The logic consists in getting the first result page and converting the result into JSON records. The buffer then retrieves the next result page, if needed, and so on.
  <5> The `next` method returns the next record from the buffer. When there is no record left, the buffer returns `null`.
  <6> In this method, the HTTP client is used to perform the HTTP request to the search API. +
  Depending on the HTTP response status code, the results are retrieved or an error is thrown.
  <7> The `extractMediaType` method allows to extract the media type returned by the API.
  
  You now have created a simple Talend component that consumes a REST API.
  
  To learn how to test this component, refer to xref:tutorial-test-rest-api.adoc[this tutorial].
  