# cHttp

Provides HTTP-based endpoints for consuming and producing HTTP resources.

For more information, see the Apache camel documentation https://camel.apache.org/components/latest/.

## cHttp Standard properties

These properties are used to configure cHttp running in the Standard Job framework.

The Standard cHttp component belongs to the Connectivity family.

## Basic settings

| Properties | Description |
| --- | --- |
| Uri | The URI of the Http resource to call. |
| Client | Select this option to use cHttp as a client to call external servers. |
| Server | Select this option to use cHttp as a server to produce Web services. |
| Client Configuration / Method | <ul> <li> <p>Select an HTTP request method from <span>GET</span>, <span>POST</span>, <span>PUT</span>, <span>DELETE</span>,                        <span>HEAD</span>, <span>OPTIONS</span>, <span>TRACE</span>, and <span>PATCH</span> in the list.</p> </li> <li> <p> <span>GET</span>: Retrieve the information								identified by the request URI.</p> <p> <span>Parameters</span>: click the <span>[+]</span> button to add lines as needed and								define the key and value in the table.</p> <p> <span>Encoder Charset</span>: enter the								encoder charset in the field.</p> </li> <li> <p> <span>POST</span>: Request that the origin								server accept the entity enclosed in the request as a new								subordinate of the resource identified by the request URI.</p> <p> <span>Plain Text</span>: select the <span>Content-Type</span> from <em>text/plain</em>, <em>text/html</em>, <em>text/xml</em>, <em>application/x-www-form-urlencoded</em>, <em>application/xml</em>, <em>application/JSON</em>, or <em>other...</em> (specify the Content-Type in								the next field that appears when <em>other...</em> is selected), and type in the text in the									<span>Content</span> box as the request								message.</p> <p> <span>Form Style</span>: click the <span>[+]</span> button to add lines as needed and								define the key and value in the <span>Parameters</span> table. Also, enter the encoder charset in								the <span>Encoder Charset</span> field.</p> <p> <span>Use Message Body</span>: use the incoming message body as the								Http request. Select the <span>Content-Type</span> from <em>text/plain</em>, <em>text/html</em>, <em>text/xml</em>, <em>application/x-www-form-urlencoded</em>, <em>application/xml</em>, <em>application/JSON</em>, or <em>other...</em> (specify the Content-Type in								the next field that appears when <em>other...</em> is selected),</p> </li> <li> <p> <span>PUT</span>: Request that the								enclosed entity be stored under the supplied request URI.</p> <p> <span>Plain Text</span>: select the <span>Content-Type</span> from <em>text/plain</em>, <em>text/html</em>, <em>text/xml</em>, <em>application/x-www-form-urlencoded</em>, <em>application/xml</em>, <em>application/JSON</em>, or <em>other...</em> (specify the Content-Type in								the next field that appears when <em>other...</em> is selected), and type in the text in the									<span>Content</span> box as the request								message.</p> <p> <span>Form Style</span>: click the <span>[+]</span> button to add lines as needed and								define the key and value in the <span>Parameters</span> table. Also, enter the encoder charset in								the <span>Encoder Charset</span> field.</p> <p> <span>Use Message Body</span>: use the incoming message body as the								Http request. Select the <span>Content-Type</span> from <em>text/plain</em>, <em>text/html</em>, <em>text/xml</em>, <em>application/x-www-form-urlencoded</em>, <em>application/xml</em>, <em>application/JSON</em>, or <em>other...</em> (specify the Content-Type in								the next field that appears when <em>other...</em> is selected),</p> </li> <li> <p> <span>DELETE</span>: Request that the origin								server delete the resource identified by the request URI.</p> <p> <span>Parameters</span>: click the <span>[+]</span> button to add lines as needed and								define the key and value in the table.</p> <p> <span>Encoder Charset</span>: enter the								encoder charset in the field.</p> </li> <li> <p> <span>HEAD</span>: Identical to GET except								that the server MUST NOT return a message body in the								response.</p> <p> <span>Parameters</span>: click the <span>[+]</span> button to add lines as needed and								define the key and value in the table.</p> <p> <span>Encoder Charset</span>: enter the								encoder charset in the field.</p> </li> <li> <p> <span>OPTIONS</span>: Represent a request for								information about the communication options available on the								request/response chain identified by the request URI.</p> </li> <li> <p> <span>TRACE</span>: Invoke a remote,								application-layer loop-back of the request message.</p> </li> <li> <p> <span>PATCH</span>: Modify data partially based on the given                     parameters.</p> <p> <span>Plain Text</span>: select the                        <span>Content-Type</span> from <em>text/plain</em>,                     <em>text/html</em>, <em>text/xml</em>, <em>application/x-www-form-urlencoded</em>,                        <em>application/xml</em>, <em>application/JSON</em>, or <em>other...</em>. Specify                     the Content-Type in the next field that appears when <em>other...</em> is                     selected.</p> <p> <span>Form Style</span>: click the <span>[+]</span> button                     to add lines as needed and define the key and value in the                        <span>Parameters</span> table. </p> <p> <span>Use Message Body</span>: use the incoming message body as the                     HTTP request. Select the <span>Content-Type</span> from                        <em>text/plain</em>, <em>text/html</em>, <em>text/xml</em>,                        <em>application/x-www-form-urlencoded</em>, <em>application/xml</em>,                        <em>application/JSON</em>, or <em>other...</em>. Specify the Content-Type in the                     next field that appears when <em>other...</em> is selected.</p> </li> </ul> |
| Server Configuration / Disable<br>Stream Cache | DefaultHttpBinding will copy the request input stream<br>into a stream cache and put it into message body. When this check box is<br>selected, DefaultHttpBinding will set the request input stream directly<br>into the message body. |
| Server Configuration / Session<br>Support | Select this check box to enable the session manager on<br>the server side of Jetty. |
| Server Configuration / Use<br>Transfer-Encoding | This option is enabled by default. If this check box is<br>cleared, Jetty servlet will disable the HTTP streaming and set the<br>content-length header on the response. |
| Server Configuration / Enable<br>JMX | Select this option to enable Jetty JMX support for this<br>endpoint. For more information about this option, see the sitehttp://camel.apache.org/jetty.html#Jetty-JettyJMXsupport. |
| Server Configuration / Match on<br>URI Prefix | Select this check box to use the CamelServlet to find a<br>target consumer by matching the URI prefix if no exact match is found.<br>For more information about this option, see the site http://camel.apache.org/how-do-i-let-jetty-match-wildcards.html. |
| Server Configuration / Use Jetty<br>Continuation | Select this check box to use Jetty continuations for the<br>Jetty Server. For more information about this option, see the site http://wiki.eclipse.org/Jetty/Feature/Continuations. |
| Server Configuration / Enable<br>HTTP TRACE | Select this option to enable the HTTP TRACE<br>method. |

## Advanced settings

| Properties | Description |
| --- | --- |
| Headers | Click the [+] button to add lines<br>as needed and define the key and value for headers. See the site https://camel.apache.org/components/latest/http-component.html for available URI options. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | cHttp provides Http based endpoints for consuming<br>external Http resources, that is to say as a client to call external<br>servers using Http. |
| Limitation | Due to license incompatibility, one or more JARs required to use this component<br>are not provided. You can install the missing JARs for this particular component by<br>clicking the Install button on the Component tab view. You can also find out and add all missing<br>JARs easily on the Modules tab in the Integration perspective of Talend Studio. For<br>details, see [Installing external modules](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/installing-external-modules). |

**Related concepts**

* [Retrieving the content of a remote file](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-internet/chttp-csetbody-cprocessor-cmessagingendpoint-retrieving-content-of-remote-file)
* [Using cHttp to produce a Web service](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-internet/chttp-cprocessor-using-chttp-to-produce-web-service)