<commit_before>//tag::ref-doc[]
= Http Source

A source application that listens for HTTP requests and emits the body as a message payload.
If the Content-Type matches `text/*` or `application/json`, the payload will be a String,
otherwise the payload will be a byte array.

== Options

The **$$http$$** $$source$$ supports the following configuration properties:

//tag::configuration-properties[]
$$http.mapped-request-headers$$:: $$Headers that will be mapped.$$ *($$String[]$$, default: `$$<none>$$`)*
$$http.path-pattern$$:: $$An Ant-Style pattern to determine which http requests will be captured.$$ *($$String$$, default: `$$/$$`)*
$$server.port$$:: $$Server HTTP port.$$ *($$Integer$$, default: `$$<none>$$`)*
//end::configuration-properties[]

NOTE: Security is disabled for this application by default.
To enable it, you should use standard Spring Boot `security.basic.enabled = true` property.

//end::ref-doc[]
== Build

```
$> mvn package
```
<commit_msg>Update README.adoc<commit_after>//tag::ref-doc[]
= Http Source

A source application that listens for HTTP requests and emits the body as a message payload.
If the Content-Type matches `text/*` or `application/json`, the payload will be a String,
otherwise the payload will be a byte array.

== Input

N/A 

== Output

==== Headers:

* `Content-Type: Any`

==== Payload:

If content type matches `text/*` or `application/json` 

* `String`

If content type does not match `text/*` or `application/json` 

* `byte array`

== Options

The **$$http$$** $$source$$ supports the following configuration properties:

//tag::configuration-properties[]
$$http.mapped-request-headers$$:: $$Headers that will be mapped.$$ *($$String[]$$, default: `$$<none>$$`)*
$$http.path-pattern$$:: $$An Ant-Style pattern to determine which http requests will be captured.$$ *($$String$$, default: `$$/$$`)*
$$server.port$$:: $$Server HTTP port.$$ *($$Integer$$, default: `$$<none>$$`)*
//end::configuration-properties[]

NOTE: Security is disabled for this application by default.
To enable it, you should use standard Spring Boot `security.basic.enabled = true` property.

//end::ref-doc[]
== Build

```
$ ./mvnw clean install -PgenerateApps
$ cd apps
```
You can find the corresponding binder based projects here.
You can then cd into one one of the folders and build it:
```
$ ./mvnw clean package
```

== Examples

```
java -jar http_source.jar
```

{'fraction_non_alphanumeric': 0.1713213839099625, 'fraction_numerical': 0.0, 'mean_word_length': 4.839416058394161, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1785186', 'n_tokens_mistral': 725, 'n_tokens_neox': 691, 'n_words': 272}