> For the complete documentation index, see [llms.txt](https://ilogtail.gitbook.io/ilogtail-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ilogtail.gitbook.io/ilogtail-docs/pre-release/plugins/shu-ru-cha-jian/kuo-zhan-shu-ru-cha-jian/service-input-example.md).

# 【示例】ServiceInput

## 简介

`service_input_example` 可作为编写`ServiceInput`类插件的参考示例样例，可以在指定端口接收模拟HTTP请求。[源代码](https://github.com/alibaba/loongcollector/blob/main/plugins/input/example/service_example.go)

## 事件能力

列含义见 [概览 · 事件能力列说明](https://ilogtail.gitbook.io/ilogtail-docs/pre-release/plugins/shu-ru-cha-jian/kuo-zhan-shu-ru-cha-jian/pages/V3l051tHPlzCBkmzOfvu#事件能力列说明)。

| Log | Metric | Span |
| --- | ------ | ---- |
| ✓   | —      | —    |

## 版本

[Stable](/ilogtail-docs/pre-release/plugins/stability-level.md)

## 版本说明

* 推荐版本：iLogtail v1.0.27 及以上

## 配置参数

| 参数      | 类型，默认值          | 说明                               |
| ------- | --------------- | -------------------------------- |
| Type    | string，无默认值（必填） | 插件类型，固定为`service_input_example`。 |
| Address | string，`：19000` | 接收端口。                            |

## 样例

* 采集配置

```yaml
enable: true
inputs:
  - Type: service_input_example
flushers:
  - Type: flusher_stdout
    OnlyStdout: true  
```

* 输入

```bash
curl --header "test:val123" http://127.0.0.1:19000/data
```

* 输出

```json
{
    "test":"val123",
    "__time__":"1658495321"
}
```
