Basic Connection

This connection is tied with basic authentication. You can define custom headers and values.

Properties

Option

Type

Default

Description

Option

Type

Default

Description

id

string

 

ID of the connection.

url

string

 

Base URL of the connection. A full path must be provided (e.g.: https://...).

headers

java.util.Map

 

Custom headers.

certificateName

string

 

Name of the certificate.

authRequestHeaderBearer

string

Basic

Prefix of the value in auth header. For example: Basic zxz13ss.

authRequestHeader

string

Authorization

Header name of the auth header.

username

string

 

Username for basic authentication.

password

string

 

Password for basic authentication.

Examples

Define a new connection:

<bean id="basicConn" class="net.pricefx.integration.component.rest.domain.connection.BasicConnection"> <property name="url" value="https://thecompany.com"/> <property name="authRequestHeaderBearer" value="Pricefx"/> <property name="authRequestHeader" value="PartitionX"/> <property name="username" value="pasta"/> <property name="password" value="rasta"/> </bean>

Use it in a route:

<route id="opendata2-create"> <from uri="direct:create"/> <to uri="pfx-rest:post?uri=/A_SalesOrder&amp;connection=basicConn"/> <to uri="mock:create"/> </route>

Results:

IntegrationManager version 5.8.0