fetchDSL

A DSL for HTTP requests

License

License

Categories

Categories

Net
GroupId

GroupId

net.devslash.fetchdsl
ArtifactId

ArtifactId

benchmarks
Last Version

Last Version

0.16.9
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

fetchDSL
A DSL for HTTP requests
Project URL

Project URL

https://fetchdsl.dev
Source Code Management

Source Code Management

https://github.com/devslash-paul/fetchdsl

Download benchmarks

Dependencies

runtime (6)

Group / Artifact Type Version
org.openjdk.jmh : jmh-core jar 1.21
org.jetbrains.kotlin : kotlin-stdlib jar 1.4.20
io.ktor : ktor-server-netty jar 1.1.4
net.devslash.fetchdsl : api jar 0.16.9
net.devslash.fetchdsl : service jar 0.16.9
net.devslash.fetchdsl : extensions jar 0.16.9

Project Modules

There are no modules declared in this project.

fetchDSL

fetchDSL is a tool that aims to provide the ability to easily declaritively create a series of HTTP calls

Build Status

Uses

FetchDSL has been designed to be able to easily parallise thousands of HTTP calls with little to no effort from the user. It also works wonderfully for once-off calls, especially when setup for that call is consistent between different examples (think website login).

Examples

A basic example that'll send a GET request to http://example.com

runHttp {
    call("http://example.com")
}

As simple as that you'll have a HTTP call. Of course, the same could have easily been done with cURL. So lets go onto slightly more challenging problems.

GET multiple times

runHttp {
    call("http://example.com/!1!") {
        data = FileDataSuppler("inputfile")
    }
}

This will call http://example.com/ one time for every line in inputfile. Not only that, but it'll replace !1! with whatever is the first part of the line (by default split by spaces).

More Examples

For more examples, see the "examples" directory.

Versions

Version
0.16.9
0.16.8
0.16.7