<commit_before>#TinyHttp
TinyHttp is a small, lightweight http server API for Java. It allows you to dynamiclly respond to requests in java code.

##Features

* Respond dynamiclly to responses using java code
* Serve files from the file system
* Stream large data using StreamResponse API
* Easy to use API

##How to respond dynamiclly

TinyHttp allows you to dynamiclly respond to requests made by a client using java code. This can be acomplished by creating
a TinyListener class.

An example listener class looks something like this:

```java
public class DefaultTinyListener implements TinyListener {

    @GetHandler(request = "/wat.*")
    public void defaultGet(RequestInfo info, Respond respond) {
        respond.echo("hi");
    }

    @GetHandler(request = "/index.html|/")
    public void index(RequestInfo info, Respond respond) {
        respond.echo(
                "<html>\n" +
                "    <body>\n" +
                "        <h1>Hello " + info.getClient().getSocket().getInetAddress().toString().substring(1) + "!</h1>\n" +
                "    </body>\n" +
                "</html>"
        );
    }

    @GetHandler(request = "/api/[a-z]+")
    @PostHandler(request = "/api/[a-z]+")
    public void api(RequestInfo info, Respond respond) {
        respond.setStatusCode(StatusCode.Found);
        respond.echo("You requested " + info.getFileRequest());
    }
}
```

Each method with a handler annotation is invoked when a client connects with a request matching one of the methods annotations.
The annotations support regex, so you can tie multiple kinds of requests to a single method.<commit_msg>Fix example<commit_after>#TinyHttp
TinyHttp is a small, lightweight http server API for Java. It allows you to dynamiclly respond to requests in java code.

##Features

* Respond dynamiclly to responses using java code
* Serve files from the file system
* Stream large data using StreamResponse API
* Easy to use API

##How to respond dynamiclly

TinyHttp allows you to dynamiclly respond to requests made by a client using java code. This can be acomplished by creating
a TinyListener class.

An example listener class looks something like this:

```java
public class DefaultTinyListener implements TinyListener {

    @GetHandler(request = "/wat.*")
    public void defaultGet(Request request, Response response) {
        response.echo("hi");
    }

    @GetHandler(request = "/index.html|/")
    public void index(Request request, Response response) {
        response.echo(
                "<html>\n" +
                "    <body>\n" +
                "        <h1>Hello " + info.getClient().getSocket().getInetAddress().toString().substring(1) + "!</h1>\n" +
                "    </body>\n" +
                "</html>"
        );
    }

    @GetHandler(request = "/api/[a-z]+")
    @PostHandler(request = "/api/[a-z]+")
    public void api(Request request, Response response) {
        response.setStatusCode(StatusCode.Found);
        response.echo("You requested " + info.getFileRequest());
    }
}
```

Each method with a handler annotation is invoked when a client connects with a request matching one of the methods annotations.
The annotations support regex, so you can tie multiple kinds of requests to a single method.
{'fraction_non_alphanumeric': 0.10125805461798097, 'fraction_numerical': 0.001841055538508745, 'mean_word_length': 2.9563106796116503, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1478066', 'n_tokens_mistral': 899, 'n_tokens_neox': 855, 'n_words': 328}