# Overview [![alt text](https://bestpractices.coreinfrastructure.org/projects/1737/badge)](https://bestpractices.coreinfrastructure.org/projects/1737) This component contains a number of general Apache Camel components which are intended for use by the data-router. # Maven Dependency To make use of the Camel components included in this repository, include the following artifact in your dependencies list: org.openecomp router-core 1.0.0-SNAPSHOT # How to Build: > mvn clean install ## Rest Client Component The REST client component provides a simple endpoint for sending HTTP requests to a REST endpoint. ### URI Format ecomp-rest:op[?options] Where, op = One of GET, PUT, POST, or DELETE ### URI Options The following option parameters must be passed in to the component for HTTPS communications: | Parameter | Description | | --------- | ----------- | | ecomp-client-cert | Fully qualified path to the client certificate to use for HTTPS communications. | | ecomp-keystore | Fully qualified path to the keystore file to use for HTTP communications. | | ecomp-keystore-password | Obfuscated password for the keystore. | ### IN Message #### Ecomp-Rest Header Parameters | Header Name | Description | | ----------- | ----------- | | ecomp-url | The fully qualified URL for the HTTP request to be send. This is mandatory. | #### HTTP Header Parameters The following parameters, if they are present in the Exchange In Message Headers, will be included as header values in the HTTP request generated by the component: | HTTP Header Name | | ---------------- | | X-FromAppId | | X-TransactionId | | resourceVersion | | ETag | | If-Match | | If-None-Match | | Accept | #### Message Body For HTTP operations that require a content body, the body of the IN message will be used. ### OUT Message #### Headers The following header values are populated on the OUT message: | ecomp-response-code | The response code produced by the HTTP request. | | ecomp-response-message | The response message produced by the HTTP request. | #### Message Body For HTTP operations that produce a content body, the body of the OUT message will be populated with this result. ### Example The following route file illustrates a simple example which takes console input and invokes the rest client, using the input from the console as the content body for the REST request. https://localhost:9509/services/search-data-service/v1/search/indexes/gdf/documents/88 DataLayer gdf1