Web Resources

Sending web resources the right way

Лицензия

Лицензия

Группа

Группа

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

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

web-resources
Последняя версия

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

1.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Web Resources
Sending web resources the right way
Ссылка на сайт

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

https://github.com/sdorra/web-resources
Система контроля версий

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

https://github.com/sdorra/web-resources

Скачать web-resources

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

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.github.sdorra : spotter-core Необязательный jar 2.1.1
org.apache.tika : tika-core Необязательный jar 1.24.1

provided (1)

Идентификатор библиотеки Тип Версия
javax.servlet : servlet-api jar 2.5

test (6)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter-api jar 5.6.2
org.junit.jupiter : junit-jupiter-params jar 5.6.2
org.junit.jupiter : junit-jupiter-engine jar 5.6.2
org.mockito : mockito-core jar 3.3.3
org.mockito : mockito-junit-jupiter jar 3.3.3
org.assertj : assertj-core jar 3.16.1

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

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

Web-Resources

Build Status Maven Central Quality Gates Coverage

The web-resources library is usable for serving files over http. It does the following things for you:

  • Detects and set the right Content-Type for the resource
  • Partial caching via Last-Modified, If-Modified-Since and If-Unmodified-Since header
  • Partial caching via ETag, If-Match, If-None-Match header
  • Sets Content-Disposition header
  • Head request without content
  • Optional GZIP compression
  • Optional handling Expires header
  • Optional handling Cache-Control header

Usage

Add the latest stable version of to the dependency management tool of your choice.

E.g. for maven:

<dependency>
    <groupId>com.github.sdorra</groupId>
    <artifactId>web-resources</artifactId>
    <version>x.y.z</version>
</dependency>

Use the latest version from maven central: Maven Central

Example

Path path = Paths.get("myfile.txt");

WebResourceSender.create()
        .withGZIP()
        .withExpires(7, TimeUnit.DAYS)
        .resource(path)
        .send(request, response);

License

This project is licensed under the MIT License - see the LICENSE file for details

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

Версия
1.1.1
1.1.0
1.0.4
1.0.3
1.0.2
1.0.1