# HTTP Sink Connector HTTP Endpoint Issue

**URL:** <https://forum.confluent.io/t/http-sink-connector-http-endpoint-issue/6843>\
**Category:** Kafka Connect\
**Created:** [16 December 2022 14:01 UTC](https://forum.confluent.io/t/http-sink-connector-http-endpoint-issue/6843 "2022-12-16T14:01:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dixitsingla](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dixitsingla/32/2620_2.png) [@dixitsingla](https://forum.confluent.io/u/dixitsingla)\
**Post date:** [16 December 2022 14:01 UTC](https://forum.confluent.io/t/http-sink-connector-http-endpoint-issue/6843/1 "2022-12-16T14:01:13Z")

</div>

Hi Everyone,

I am new to Kafka Connect. we have decided to use HTTP Sink connector for one of our application and doing a POC around it. We are facing few issues in HTTP Kafka sink connector at the Rest End Point which is created in .net.

HTTP Sink connector is configured successfully and throwing the data to Rest end point. Now at the rest end point we are having issues in receiving the message.

The data in Kafka topic is published as per Avro schema so we are using Avro converter in the sink connector. At the rest end point we have created a dto from the avro schema using avrogen. When the http sink connector throws data to the end point it’s giving “415 Unsupported media type” error.

We wanted to know how the .net api will receive the data, what request object we need to use to capture the data sent by http sink connector. Would request you to please help us with the same or if there is any sample basic project please let provide us the details.

Avro Schema:

```auto
{
	"fields": [
		{
			"name": "id",
			"type": "string"
		},
		{
			"name": "name",
			"type": "string"
		}
	],
	"name": "article",
	"namespace": "test.data",
	"type": "record"
}

```

HTTP Sink connector config:

```auto
{
"name": "HTTPSinkConnector_1",
"config": {
    "topics": "test_data_topic_1",
    "tasks.max": "1",
    "connector.class": "io.confluent.connect.http.HttpSinkConnector",
    "http.api.url": "http://localhost/messageHandler",
    "request.method": "post",
    "key.converter":"org.apache.kafka.connect.storage.StringConverter",
    "value.converter": "io.confluent.connect.avro.AvroConverter",
    "value.converter.schema.registry.url": "http://schema-registry:8081",
    "confluent.topic.bootstrap.servers": "kafka:19092",
    "confluent.topic.replication.factor": "1",
    "reporter.bootstrap.servers": "kafka:19092",
    "reporter.result.topic.name": "success-responses",
    "reporter.result.topic.replication.factor": "1",
    "reporter.error.topic.name": "error-responses",
    "reporter.error.topic.replication.factor": "1"
}

```

---

<div class="post-metadata">

**Author:** ![OneCricketeer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/onecricketeer/32/1551_2.png) [@OneCricketeer](https://forum.confluent.io/u/OneCricketeer)\
**Post date:** [21 December 2022 13:56 UTC](https://forum.confluent.io/t/http-sink-connector-http-endpoint-issue/6843/2 "2022-12-21T13:56:49Z")

</div>

> The connector consumes records from Kafka topic(s) and converts each record value to a String or a JSON with `request.body.format=json`

You seem to be missing that property.

> **[HTTP Sink Connector for Confluent Platform | Confluent Documentation](https://docs.confluent.io/kafka-connectors/http/current/overview.html#features)**
>
> Get started with the HTTP Sink connector for Confluent Platform.

---

<div class="post-metadata">

**Author:** ![dixitsingla](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dixitsingla/32/2620_2.png) [@dixitsingla](https://forum.confluent.io/u/dixitsingla)\
**Post date:** [26 December 2022 10:19 UTC](https://forum.confluent.io/t/http-sink-connector-http-endpoint-issue/6843/3 "2022-12-26T10:19:51Z")

</div>

Thanks a lot. This is working fine.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [24 January 2023 21:52 UTC](https://forum.confluent.io/t/http-sink-connector-http-endpoint-issue/6843/4 "2023-01-24T21:52:34Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
