---
title: http_client
page-cloud: true
latest-operator-version: v26.2.6
latest-console-tag: v3.14.0
latest-connect-version: 4.118.0
latest-redpanda-tag: v26.2.7
docname: connect/components/outputs/http_client
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/components/outputs/http_client.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/components/outputs/http_client.adoc
description: Sends messages to an HTTP server.
page-context-switcher:
  - name: Output
    to: /cloud-data-platform/develop/connect/components/outputs/http_client/
  - name: Input
    to: /cloud-data-platform/develop/connect/components/inputs/http_client/
page-self-managed-available: "true"
page-self-managed-available-url: https://docs.redpanda.com/connect/components/outputs/http_client/
page-git-created-date: "2025-03-04"
page-git-modified-date: "2026-10-19"
page-generated-sources:
  - include: connect:components:partial$descriptions/outputs/http_client.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
page-generated-content: partial
---

# http_client

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

<!-- Source: https://docs.redpanda.com/cloud-data-platform/develop/connect/components/outputs/http_client.md -->

Sends messages to an HTTP server.

When the number of retries expires the output will reject the message, the behavior after this will depend on the pipeline but usually this simply means the send is attempted again until successful whilst applying back pressure.

The URL and header values of this type can be dynamically set using function interpolations described in [Bloblang queries](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

The body of the HTTP request is the raw contents of the message payload. If the message has multiple parts (is a batch) the request will be sent according to [RFC1341](https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html). This behavior can be disabled by setting the field [`batch_as_multipart`](#batch_as_multipart) to `false`.

## Propagate responses

It’s possible to propagate the response from each HTTP request back to the input source by setting `propagate_response` to `true`. Only inputs that support [synchronous responses](https://docs.redpanda.com/cloud-data-platform/develop/connect/guides/sync_responses/) are able to make use of these propagated responses.

## Performance

This output benefits from sending multiple messages in flight in parallel for improved performance. You can tune the max number of in flight messages (or message batches) with the field `max_in_flight`.

This output benefits from sending messages as a batch for improved performance. Batches can be formed at both the input and output level. You can find out more [in this doc](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/batching/).

### Common

```yml
output:
  label: ""
  http_client:
    url: "" # No default (required)
    verb: POST
    headers: {}
    rate_limit: "" # No default (optional)
    timeout: 5s
    max_in_flight: 64
    batching:
      count: 0
      byte_size: 0
      period: ""
      check: ""
```

### Advanced

```yml
# All configuration fields, showing default values
output:
  label: ""
  http_client:
    url: "" # No default (required)
    verb: POST
    headers: {}
    metadata:
      include_prefixes: []
      include_patterns: []
    dump_request_log_level: "" # Optional
    oauth:
      enabled: false
      consumer_key: "" # Optional
      consumer_secret: "" # Optional
      access_token: "" # Optional
      access_token_secret: "" # Optional
    oauth2:
      enabled: false
      client_key: "" # Optional
      client_secret: "" # Optional
      token_url: "" # Optional
      scopes: []
      endpoint_params: {}
    basic_auth:
      enabled: false
      username: "" # Optional
      password: "" # Optional
    jwt:
      enabled: false
      private_key_file: "" # Optional
      signing_method: "" # Optional
      claims: {}
      headers: {}
    tls:
      enabled: false
      skip_cert_verify: false
      enable_renegotiation: false
      root_cas: ""
      root_cas_file: ""
      client_certs: []
    rate_limit: "" # No default (optional)
    timeout: 5s
    retry_period: 1s
    max_retry_backoff: 300s
    retries: 3
    backoff_on:
      - 429
    drop_on: []
    successful_on: []
    proxy_url: "" # No default (optional)
    batch_as_multipart: false
    max_in_flight: 64
    batching:
      count: 0
      byte_size: 0
      period: "" # Optional
      check: "" # Optional
      processors: [] # No default (optional)
    multipart: []
```

## Fields

### `backoff_on[]`

A list of status codes that indicate a request failure and trigger retries with an increasing backoff period between attempts.

**Type**: `array<int>`

**Default**:

```yaml
- 429
```

### `basic_auth`

Configure basic authentication for requests from this component.

**Type**: `object`

### `basic_auth.enabled`

Whether to use basic authentication in requests.

**Type**: `bool`

**Default**: `false`

### `basic_auth.password`

The password to use for authentication. Used together with `username` for basic authentication.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

**Default**: `""`

### `basic_auth.username`

The username of the account credentials to authenticate as. Used together with `password` for basic authentication.

**Type**: `string`

**Default**: `""`

### `batch_as_multipart`

When set to `true`, sends all messages in a batch as a single request using [RFC1341](https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html).

When set to `false`, sends messages in a batch as individual requests.

**Type**: `bool`

**Default**: `false`

### `batching`

Configure a [batching policy](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/batching/).

**Type**: `object`

```yaml
# Examples:
batching:
  byte_size: 5000
  count: 0
  period: 1s

# ---

batching:
  count: 10
  period: 1s

# ---

batching:
  check: this.contains("END BATCH")
  count: 0
  period: 1m
```

### `batching.byte_size`

The maximum total size (in bytes) that a batch can reach before it is flushed. When the combined size of all messages in the batch reaches or exceeds this limit, the batch is immediately sent to the next stage (such as a processor or output).

Set to `0` to disable size-based batching. When disabled, messages are flushed based on other conditions (such as `count` or `period`).

**Type**: `int`

**Default**: `0`

### `batching.check`

A [Bloblang query](https://docs.redpanda.com/cloud-data-platform/develop/connect/guides/bloblang/about/) that returns a boolean value indicating whether a message should end a batch.

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
check: this.type == "end_of_transaction"
```

### `batching.count`

The number of messages at which the batch is flushed. Set to `0` to disable count-based batching.

**Type**: `int`

**Default**: `0`

### `batching.period`

The length of time after which an incomplete batch is flushed regardless of its size. This field accepts Go duration format strings such as `100ms`, `1s`, or `5s`. Supported time units are `ns`, `us`, `ms`, `s`, `m`, and `h`.

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
period: 1s

# ---

period: 1m

# ---

period: 500ms
```

### `batching.processors[]`

A list of [processors](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/about/) to apply to a batch as it is flushed. This allows you to aggregate and archive the batch however you see fit. All resulting messages are flushed as a single batch, so splitting the batch into smaller batches with these processors has no effect.

**Type**: `array<processor>`

```yaml
# Examples:
processors:
  - archive:
      format: concatenate


# ---

processors:
  - archive:
      format: lines


# ---

processors:
  - archive:
      format: json_array
```

### `disable_http2`

Whether to disable HTTP/2. By default, HTTP/2 is enabled.

**Type**: `bool`

**Default**: `false`

### `drop_on[]`

A list of status codes that indicate a request failure where retries should not be attempted. This helps avoid unnecessary retries for requests that are unlikely to succeed.

> 📝 **NOTE**
>
> In these cases, the _request_ is dropped, but the _message_ that triggered the request is retained.

**Type**: `array<int>`

**Default**: `[]`

### `dump_request_log_level`

EXPERIMENTAL: Set the logging level for the request and response payloads of each HTTP request.

**Type**: `string`

**Default**: `""`

**Options**: `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`, `""`

### `extract_headers`

Specify which response headers to add to the resulting synchronous response messages as metadata. Header keys are automatically converted to lowercase before matching, so make sure that your patterns target the lowercase versions of the expected header keys.

This field is only applicable when `propagate_response` is set to `true`.

**Type**: `object`

### `extract_headers.include_patterns[]`

A list of explicit metadata key regular expression (re2) patterns to match against.

**Type**: `array<string>`

**Default**: `[]`

```yaml
# Examples:
include_patterns:
  - .*

# ---

include_patterns:
  - _timestamp_unix$
```

### `extract_headers.include_prefixes[]`

A list of explicit metadata key prefixes to match against.

**Type**: `array<string>`

**Default**: `[]`

```yaml
# Examples:
include_prefixes:
  - foo_
  - bar_

# ---

include_prefixes:
  - kafka_

# ---

include_prefixes:
  - content-
```

### `follow_redirects`

Whether to transparently follow redirects, that is, responses with HTTP status codes in the 300-399 range. If set to `false`, the response message includes the body, status, and headers from the redirect response, and the component does not make a request to the URL specified in the `Location` header.

**Type**: `bool`

**Default**: `true`

### `headers`

A map of headers to add to the request.

This field supports [interpolation functions](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

**Type**: `object<string>`

**Default**: `{}`

```yaml
# Examples:
headers:
  Content-Type: application/octet-stream
  traceparent: ${! tracing_span().traceparent }
```

### `jwt`

(beta)

Configure JSON Web Token (JWT) authentication. This feature is in beta and may change in future releases. JWTs provide secure, stateless authentication between services.

**Type**: `object`

### `jwt.claims`

A map of claims to include in the JWT. Claims pass the identity of the authenticated entity to the service provider.

**Type**: `object`

**Default**: `{}`

### `jwt.enabled`

Whether to use JWT authentication in requests.

**Type**: `bool`

**Default**: `false`

### `jwt.headers`

Additional key-value pairs to include in the JWT header (optional). These headers provide extra metadata for JWT processing.

**Type**: `object`

**Default**: `{}`

### `jwt.private_key_file`

Path to a file containing the PEM-encoded private key using PKCS#1 or PKCS#8 format. The private key must be compatible with the algorithm specified in the `signing_method` field.

**Type**: `string`

**Default**: `""`

### `jwt.signing_method`

The cryptographic algorithm used to sign the JWT. Supported algorithms are RS256, RS384, RS512, and EdDSA. This algorithm must be compatible with the private key specified in the `private_key_file` field.

**Type**: `string`

**Default**: `""`

### `max_in_flight`

The maximum number of parallel message batches to have in flight at any given time. Increase this value to improve throughput.

**Type**: `int`

**Default**: `64`

### `max_retry_backoff`

The maximum period to wait between failed requests.

**Type**: `string`

**Default**: `300s`

### `metadata`

Specify matching rules that determine which metadata keys should be added to the HTTP request as headers.

**Type**: `object`

### `metadata.include_patterns[]`

A list of explicit metadata key regular expression (re2) patterns to match against.

**Type**: `array<string>`

**Default**: `[]`

```yaml
# Examples:
include_patterns:
  - .*

# ---

include_patterns:
  - _timestamp_unix$
```

### `metadata.include_prefixes[]`

A list of explicit metadata key prefixes to match against.

**Type**: `array<string>`

**Default**: `[]`

```yaml
# Examples:
include_prefixes:
  - foo_
  - bar_

# ---

include_prefixes:
  - kafka_

# ---

include_prefixes:
  - content-
```

### `multipart[]`

EXPERIMENTAL: Create explicit multipart HTTP requests by specifying an array of parts to add to a request. Each part consists of content headers and a data field, which can be populated dynamically.

If populated, this field overrides the default request creation behavior.

**Type**: `array<object>`

**Default**: `[]`

### `multipart[].body`

The body of the individual message part.

This field supports [interpolation functions](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
body: ${! this.data.part1 }
```

### `multipart[].content_disposition`

The content disposition of the individual message part.

This field supports [interpolation functions](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
content_disposition: form-data; name="bin"; filename='${! @AttachmentName }
```

### `multipart[].content_type`

The content type of the individual message part.

This field supports [interpolation functions](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
content_type: application/bin
```

### `oauth`

Configure OAuth version 1.0 authentication for secure API access.

**Type**: `object`

### `oauth.access_token`

The value used to gain access to the protected resources on behalf of the user.

**Type**: `string`

**Default**: `""`

### `oauth.access_token_secret`

The secret that establishes ownership of the `access_token` in OAuth 1.0 authentication.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

**Default**: `""`

### `oauth.consumer_key`

The value used to identify this component or client to the service provider.

**Type**: `string`

**Default**: `""`

### `oauth.consumer_secret`

The secret that establishes ownership of the consumer key in OAuth 1.0 authentication.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

**Default**: `""`

### `oauth.enabled`

Whether to enable OAuth version 1.0 authentication for requests.

**Type**: `bool`

**Default**: `false`

### `oauth2`

Configures authentication with OAuth version 2 using the client credentials token flow. To exchange a refresh token instead, add a `grant_type` parameter with the value `refresh_token` and a `refresh_token` parameter with the token to `endpoint_params`.

**Type**: `object`

### `oauth2.client_key`

A value used to identify the client to the token provider.

**Type**: `string`

**Default**: `""`

### `oauth2.client_secret`

The secret used to establish ownership of the client key.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

**Default**: `""`

### `oauth2.enabled`

Whether to use OAuth version 2 in requests.

**Type**: `bool`

**Default**: `false`

### `oauth2.endpoint_params`

A map of optional parameters to send to the token provider with client credentials token requests. Each value must be an array of strings.

**Type**: `object`

**Default**: `{}`

```yaml
# Examples:
endpoint_params:
  audience:
    - https://example.com
  resource:
    - https://api.example.com
```

### `oauth2.scopes[]`

A list of requested permissions (optional).

**Type**: `array<string>`

**Default**: `[]`

### `oauth2.token_url`

The URL of the token provider.

**Type**: `string`

**Default**: `""`

### `propagate_response`

Whether to [propagate server responses back](https://docs.redpanda.com/cloud-data-platform/develop/connect/guides/sync_responses/) to the input.

**Type**: `bool`

**Default**: `false`

### `proxy_url`

An HTTP proxy URL (optional).

**Type**: `string`

### `rate_limit`

A [rate limit](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/rate_limits/about/) to throttle requests by (optional).

**Type**: `string`

### `retries`

The maximum number of retry attempts to make.

**Type**: `int`

**Default**: `3`

### `retry_period`

The period to wait between failed requests before retrying. For status codes listed in `backoff_on`, this is the starting period, which increases with each attempt up to `max_retry_backoff`.

**Type**: `string`

**Default**: `1s`

### `successful_on[]`

A list of HTTP status codes that should be considered successful, even if they are not 2XX codes. This is useful for handling cases where non-2XX codes indicate that the request was processed successfully, such as `303 See Other` or `409 Conflict`.

By default, all 2XX codes are considered successful unless they are specified in the `backoff_on` or `drop_on` fields, regardless of this field.

**Type**: `array<int>`

**Default**: `[]`

### `timeout`

A static timeout to apply to requests.

**Type**: `string`

**Default**: `5s`

### `tls`

Configure Transport Layer Security (TLS) settings to secure network connections. This includes options for standard TLS as well as mutual TLS (mTLS) authentication where both client and server authenticate each other using certificates. Key configuration options include `enabled` to enable TLS, `client_certs` for mTLS authentication, `root_cas`/`root_cas_file` for custom certificate authorities, and `skip_cert_verify` for development environments.

**Type**: `object`

### `tls.client_certs[]`

A list of client certificates for mutual TLS (mTLS) authentication. Configure this field to enable mTLS, authenticating the client to the server with these certificates.

You must set `tls.enabled: true` for the client certificates to take effect.

**Certificate pairing rules**: For each certificate item, provide either:

-   Inline PEM data using both `cert` **and** `key` or

-   File paths using both `cert_file` **and** `key_file`.


Mixing inline and file-based values within the same item is not supported.

**Type**: `array<object>`

**Default**: `[]`

```yaml
# Examples:
client_certs:
  - cert: foo
    key: bar


# ---

client_certs:
  - cert_file: ./example.pem
    key_file: ./example.key
```

### `tls.client_certs[].cert`

The plaintext certificate to use for TLS authentication. Must be paired with the corresponding private key in the `key` field when using inline PEM data for mTLS client certificates.

**Type**: `string`

**Default**: `""`

### `tls.client_certs[].cert_file`

The path to a file containing the certificate to use for TLS authentication. Must be paired with the corresponding private key file in the `key_file` field when using file-based configuration for mTLS client certificates.

**Type**: `string`

**Default**: `""`

### `tls.client_certs[].key`

Private key for mTLS client certificate as inline PEM data. Must correspond to the client certificate specified in the `cert` field. Use this field together with `cert` when providing certificate data inline rather than through files.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

**Default**: `""`

### `tls.client_certs[].key_file`

Path to private key file for mTLS client certificate in PEM format. Must correspond to the client certificate specified in the `cert_file` field. Use this field together with `cert_file` when loading certificate data from files.

**Type**: `string`

**Default**: `""`

### `tls.client_certs[].password`

The password to use for the private key (specified in the `key` or `key_file` fields), if it is password-protected. The PKCS#1 and PKCS#8 formats are supported. Supports environment variable interpolation for secure password management.

The `pbeWithMD5AndDES-CBC` algorithm is obsolete and not supported for the PKCS#8 format. This algorithm does not authenticate the ciphertext, making it vulnerable to padding oracle attacks that can let an attacker recover the plaintext.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
password: foo

# ---

password: ${KEY_PASSWORD}
```

### `tls.enable_renegotiation`

Whether to allow the remote server to repeatedly request renegotiation. Enable this option if you’re seeing the error message `local error: tls: no renegotiation`.

**Type**: `bool`

**Default**: `false`

### `tls.enabled`

Whether to enable TLS for secure connections. Set to `true` to enable TLS encryption. Required to be `true` for other TLS options (like `client_certs`, `root_cas`, etc.) to take effect.

**Type**: `bool`

**Default**: `false`

### `tls.root_cas`

Specify a root certificate authority to use (optional). This is a string that represents a certificate chain from the parent-trusted root certificate, through possible intermediate signing certificates, to the host certificate. Use either this field for inline certificate data or `root_cas_file` for file-based certificate loading.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
root_cas: |-
  -----BEGIN CERTIFICATE-----
  ...
  -----END CERTIFICATE-----
```

### `tls.root_cas_file`

Specify the path to a root certificate authority file (optional). This is a file, often with a `.pem` extension, which contains a certificate chain from the parent-trusted root certificate, through possible intermediate signing certificates, to the host certificate. Use either this field for file-based certificate loading or `root_cas` for inline certificate data.

**Type**: `string`

**Default**: `""`

```yaml
# Examples:
root_cas_file: ./root_cas.pem
```

### `tls.skip_cert_verify`

Whether to skip server-side certificate verification. Set to `true` only for testing environments as this reduces security by disabling certificate validation. When using self-signed certificates or in development, this may be necessary, but should never be used in production. Consider using `root_cas` or `root_cas_file` to specify trusted certificates instead of disabling verification entirely.

**Type**: `bool`

**Default**: `false`

### `url`

The URL to connect to.

This field supports [interpolation functions](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

### `verb`

A verb to connect with.

**Type**: `string`

**Default**: `POST`

```yaml
# Examples:
verb: POST

# ---

verb: GET

# ---

verb: DELETE
```