<commit_before>Arduino TinyWebServer, release 20120106

A small web server for Arduino.

Please read up on the TWS Pre Arduino IDE 1.0 history here:

http://www.webweavertech.com/ovidiu/weblog/archives/000484.html

http://www.webweavertech.com/ovidiu/weblog/archives/000477.html

The library is licensed under the terms of LGPL 2.1. Which means
you're free to use it in your projects (including commercial ones) as
long as you're sending back the changes you make to the library.

Basic web server
================

To make use of the TWS library, you need to include the following your
sketch:

    #include <Ethernet.h>
    #include <EthernetDHCP.h>
    #include <Flash.h> *
    #include <FD.h>
    #include <TinyWebServer.h>

EthernetDHCP is optional, but it makes acquiring an IP address a lot
easier if you have a DHCP server in your network.

*(06/Jan/2012) Note that the external library 'Flash' 3.0 found here:
http://arduiniana.org/libraries/flash/

Needs to have one (#include <WProgram.h>)line removed, if it is to work with the Arduino IDE >1.0. 

TinyWebServer
TWS is implemented by the TinyWebServer class. The constructor method
takes two arguments. The first one is a list of handlers, functions to
be invoked when a particular URL is requested by an HTTP client. The
second one is a list of HTTP header names that are needed by the
implementation of your handlers. More on these later.

An HTTP handler is a simple function that takes as argument a
reference to the TinyWebServer object. When you create the
TinyWebServer class, you need to pass in the handlers for the various
URLs. Here is a simple example of a web server with a single handler.

    static uint8_t mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

    boolean index_handler(TinyWebServer& web_server) {
      web_server.send_error_code(200);
      web_server << F("<html><body><h1>Hello World!</h1></body></html>\n");
      return true;
    }

    TinyWebServer::PathHandler handlers[] = {<commit_msg>Updated to make clear the external library dependencies.<commit_after>Arduino TinyWebServer

A small web server for Arduino.

Please read up on the TinyWebServer history here:

http://www.webweavertech.com/ovidiu/weblog/archives/000484.html

http://www.webweavertech.com/ovidiu/weblog/archives/000477.html

The library is licensed under the terms of LGPL 2.1. Which means
you're free to use it in your projects (including commercial ones) as
long as you're sending back the changes you make to the library.

External dependencies
====================

TinyWebServer depends on the external library Flash version 3.0, which
is found here:

http://arduiniana.org/libraries/flash/

At the time of this writing (January 10, 2012), Flash 3.0 needs a
small change to make it compatible with Arduino 1.0. In Flash/Flash.h
replace the line

#include <WProgram.h>

with:

#if ARDUINO < 100
#include <WProgram.h>
#else
#include <Arduino.h>
#endif

Basic web server
================

To make use of the TinyWebServer library, you need to include the
following your sketch:

    #include <Ethernet.h>
    #include <Flash.h>
    #include <SD.h>
    #include <TinyWebServer.h>

TWS is implemented by the TinyWebServer class. The constructor method
takes two arguments. The first one is a list of handlers, functions to
be invoked when a particular URL is requested by an HTTP client. The
second one is a list of HTTP header names that are needed by the
implementation of your handlers. More on these later.

An HTTP handler is a simple function that takes as argument a
reference to the TinyWebServer object. When you create the
TinyWebServer class, you need to pass in the handlers for the various
URLs. Here is a simple example of a web server with a single handler.

    static uint8_t mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

    boolean index_handler(TinyWebServer& web_server) {
      web_server.send_error_code(200);
      web_server << F("<html><body><h1>Hello World!</h1></body></html>\n");
      return true;
    }

    TinyWebServer::PathHandler handlers[] = {
{'fraction_non_alphanumeric': 0.08538993089832182, 'fraction_numerical': 0.021470878578479763, 'mean_word_length': 4.059925093632959, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '275857', 'n_tokens_mistral': 1309, 'n_tokens_neox': 1195, 'n_words': 531}