> For the complete documentation index, see [llms.txt](https://docs.cybus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cybus.io/1-7-3/documentation/industry-protocol-details/http-rest/httpconnection.md).

# HttpConnection

## `scheme` (string, enum)

Transport scheme to be used

This element must be one of the following enum values:

* `http`
* `https`

Example: `"https"`

## `host` (string, required)

Domain name or IP Address of the server to connect to

Examples: `"126.4.10.52"`, `"example.org"`

## `port` (integer, required)

HTTP Port to use, usually 80 or 443

Default: `443`

Example: `15200`

## `prefix` (string)

Path prefix that is applied to all endpoints

Default: `""`

Example: `"/api/v1"`

## `headers` (object)

HTTP Headers that are added to all requests

Default:

```
{}
```

Example: `{"Content-type":"application/json"}`

## `query` (object)

Query variables that are added to all requests

Example: `{"foo":"bar"}`

## `auth` (object)

Credentials for Basic Auth

Properties of the `auth` object:

#### `username` (string)

#### `password` (string)

## `oauthClientCredentials` (object)

Oauth Client Credentials flow configuration

Properties of the `oauthClientCredentials` object:

#### `auth_url` (string, required)

#### `client_id` (string, required)

#### `client_secret` (string, required)

#### `grant_type` (string)

Default: `"client_credentials"`

#### `audience` (string)

## `probeInterval` (integer)

Interval in milliseconds to check if connection is still there

Default: `10000`

## `probeTimeout` (integer)

Timeout in milliseconds after which the probe request gets abort. (Defaults to 0, because of backwards compatibility - no timeout)

Default: `0`

Examples: `0`, `1000`, `3000`

## `probePath` (string)

The path that should be used to check the health of the server

Default: `"/"`

## `probeMethod` (string, enum)

The HTTP method to use for contacting the configured Probe URL

This element must be one of the following enum values:

* `GET`
* `HEAD`

Default: `"HEAD"`

## `mutualAuthentication` (boolean)

If true, a full certificate chain including client certificate is expected to connect properly with validated certificates.

Default: `false`

Examples: `true`, `false`

## `trustAllCertificates` (boolean)

If true, all server certificates will be accepted, regardless of whether they can be validated or not. Use this option if self-signed server certificates should be accepted, or if there are other reasons which prevent this client to validate the certificates.

Default: `false`

Examples: `true`, `false`

## `caCert` (string)

The root CA certificate as Base64 encoded PEM file content

## `clientCert` (string)

The client certificate as Base64 encoded PEM CRT file content

## `clientPrivateKey` (string)

The client private key as Base64 encoded PEM CRT file content

## `connectionStrategy` (object)

If a connection attempt fails, retries will be performed with increasing delay (waiting time) in between. The following parameters control how these delays behave.

Properties of the `connectionStrategy` object:

#### `initialDelay` (integer)

Delay (waiting time) of the first connection retry (in milliseconds). For subsequent retries, the delay will be increased according to the parameter incrementFactor which has a default value of 2.

Default: `1000`

Additional restrictions:

* Minimum: `1000`

#### `maxDelay` (integer)

Maximum delay (waiting time) to wait until the next retry (in milliseconds). The delay (waiting time) for any subsequent connection retry will not be larger than this value. Must be strictly greater than initialDelay.

Default: `30000`

#### `incrementFactor` (integer)

The factor used to increment initialDelay up to maxDelay. For example if initialDelay is set to 1000 and maxDelay to 5000 the values for the delay would be 1000, 2000, 4000, 5000.

Default: `2`

Additional restrictions:

* Minimum: `2`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cybus.io/1-7-3/documentation/industry-protocol-details/http-rest/httpconnection.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
