com.zarbosoft:gettus

Asynchronous HTTP requests library for XNIO

Лицензия

Лицензия

Группа

Группа

com.zarbosoft
Идентификатор

Идентификатор

gettus
Последняя версия

Последняя версия

0.0.10
Дата

Дата

Тип

Тип

jar
Описание

Описание

com.zarbosoft:gettus
Asynchronous HTTP requests library for XNIO
Ссылка на сайт

Ссылка на сайт

https://github.com/rendaw/gettus
Система контроля версий

Система контроля версий

http://github.com/rendaw/gettus/tree/master

Скачать gettus

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.zarbosoft/gettus/ -->
<dependency>
    <groupId>com.zarbosoft</groupId>
    <artifactId>gettus</artifactId>
    <version>0.0.10</version>
</dependency>
// https://jarcasting.com/artifacts/com.zarbosoft/gettus/
implementation 'com.zarbosoft:gettus:0.0.10'
// https://jarcasting.com/artifacts/com.zarbosoft/gettus/
implementation ("com.zarbosoft:gettus:0.0.10")
'com.zarbosoft:gettus:jar:0.0.10'
<dependency org="com.zarbosoft" name="gettus" rev="0.0.10">
  <artifact name="gettus" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.zarbosoft', module='gettus', version='0.0.10')
)
libraryDependencies += "com.zarbosoft" % "gettus" % "0.0.10"
[com.zarbosoft/gettus "0.0.10"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
io.undertow : undertow-core jar 2.0.14.Final
com.zarbosoft.rendaw : common jar 1.0.0
org.slf4j : slf4j-api jar 1.7.24
com.fasterxml.jackson.core : jackson-databind jar 2.9.5

Модули Проекта

Данный проект не имеет модулей.

Gettus

Gettus is an asynchronous HTTP client for use with XNIO built with Undertow routines. It never starts or blocks threads. There are currently two client flavors:

  1. Gettus - an interface based on CompletableFutures
  2. Cogettus (separate artifact) - an interface for use with coroutines

This project is fairly incomplete - there's no built in session management, proxy support, or redirects but it is entirely usable. I've interacted with AWS via their HTTP API and a number of websites using Gettus and encountered no issues so far. If you'd like to try your hand at implementing these features though, PRs welcome.

Example (Cogettus)

final SensorDataArray response = new Cogettus(formatURI("http://%s/recent", sensorHost))
		.bodyJson(w -> {
			w.writeStartObject();
			w.writeNumberField("count", 100);
			w.writeEndObject();
		})
		.send(worker)
		.body()
		.check()
		.json(SensorDataArray.class);

Maven

Gettus:

<dependency>
    <groupId>com.zarbosoft</groupId>
    <artifactId>gettus</artifactId>
    <version>0.0.10</version>
</dependency>

Cogettus

<dependency>
    <groupId>com.zarbosoft</groupId>
    <artifactId>cogettus</artifactId>
    <version>0.0.10</version>
</dependency>

Версии библиотеки

Версия
0.0.10
0.0.9
0.0.2
0.0.1