http-endec

Http encoder/decoder for Java/Android

Лицензия

Лицензия

Группа

Группа

fr.bmartel
Идентификатор

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

http-endec
Последняя версия

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

1.04
Дата

Дата

Тип

Тип

jar
Описание

Описание

http-endec
Http encoder/decoder for Java/Android
Ссылка на сайт

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

https://github.com/bertrandmartel/http-endec
Система контроля версий

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

https://github.com/bertrandmartel/http-endec

Скачать http-endec

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

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

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

http-endec

Build Status Download Maven Central Coverage Status License

Http encoder/decoder for Java/Android


  • This endec works with streaming data in a socket-blocking configuration.
  • It will block until the whole current HTTP frame is totally parsed.

Include in your project

  • with Gradle, from jcenter :
compile 'fr.bmartel:http-endec:1.03'

How to use ?

Build HTTP request

HttpFrame frameRequest = new HttpFrame(
							HttpMethod.POST_REQUEST      ,
							new HttpVersion(1, 1)        ,
							new HashMap<String, String>(),
							"/rest/help/todo"            ,
							new ListOfBytes("some body")
						);

Build HTTP response

HttpResponseFrame frameResponse = new HttpResponseFrame(
										new StatusCodeObject(200, "OK"),
										new HttpVersion(1, 1),
										new HashMap<String, String>(),
										""
									);

Parse HTTP inputstream

HttpFrame newFrame = new HttpFrame();

newFrame.parseHttp(inputstream);

You can access your result in sub methods :

Method Type description
getUri() String http uri
getHttpVersion() HttpVersion http version
getMethod() String http code
getQueryString() String http query string
getHost() String host
getBody() IByteList body content

Change your buffer size

In fr.bmartel.protocol.socket.DataBufferConst

Change the value :

public final static int DATA_BLOCK_SIZE_LIMIT = 4089;

JavaDoc

http://bertrandmartel.github.io/http-endec

Compatibility

JRE 1.7 compliant

Build

Gradle using IntelliJ IDEA or Eclipse

Specifications

Specification from RFC specified in https://www.ietf.org/rfc/rfc2616.txt

License

The MIT License (MIT) Copyright (c) 2016 Bertrand Martel

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

Версия
1.04
1.03