Skip to content
This repository was archived by the owner on Apr 19, 2022. It is now read-only.

Latest commit

 

History

History
44 lines (33 loc) · 1.64 KB

File metadata and controls

44 lines (33 loc) · 1.64 KB

scriptella-http

An HTTP connection driver for Scriptella.

Maven Central

This driver was reverse-engineered from the source code of other Scriptella drivers, notably the CSV driver. As such, the structure may be a little odd or not as expected from an official driver.

Usage

The driver can be used by adding the .jar to the lib folder in your scriptella install directory (link coming soon). Example usage:

  <!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
    <connection id="http" driver="nz.ac.auckland.scriptella.driver.http.Driver" url="http://127.0.0.1:8080">
        type=post
        format=string
        timeout=600
    </connection>
    <connection id="csv" driver="csv" url="IntegrationTest.csv"/>

    <query connection-id="csv">
        <!-- Empty query means select all columns -->
        <script connection-id="http">
            abc=${One}
            def=${Two}
            ghi=${Three}

        </script>
    </query>
</etl>

Values for type: GET(default), POST, PUT.

Values for format: Form(URL form encoding), JSON, XML, Text(Default). Format can only be specified for PUT and POST requests, GET requests will always use URL form encoding.

Timeout is in ms. default value is 0(infinite).

The driver can only be used in a script tag, queries are not implemented. Variables are specified int the format "${variable-name}". The variables here represent the names of the headers in the CSV file.