Skip to content

component http4

assimbly edited this page Apr 28, 2020 · 9 revisions

The http component calls a http(s) url. It can be used on the client site to get or post HTTP messages.

URI

URL Path

If you have to call a http url then you can use the HTTP component. When calling a https url use the HTTPS component.

You only need the path after 'http(s)'.For example for the URL: https://example.com/order you need only need to add

example.com/order to Assimbly.

URI Examples

For the url http://localhost:8080/order file add the following URI context:

localhost:8080/order

To-Enpoint_HTTPS

HTTPS

For HTTPS (SSL/TLS certificates) you can use the HTTPS component. Assimbly has TLS support build-in.

How to work with TLS Certificates?

Response messages

By default the Assimbly flow is one way. To get the reply:

  1. Create a message header

Settings --> Headers --> Create Header

Set a (constant) message header property: "ReplyTo".

For example the property: ReplyTo=articleResponse. In that case the response message will be posted to the endpoint "VM://articleResponse".

FirstStart

  1. Select the header within the endpoint of the flow

  2. Create a second flow. Set the From endpoint to "VM://nameOfQueue" (for example VM://articleResponse) and send the response to any to endpoint you like.

Common options

Most common option is

method= e.g. GET or POST

For all options, see Camel documentation

Hosting an endpoint

If you need an instance hosting a HTTP endpoint and listen to incomming message then you need the Jetty component

Clone this wiki locally