fhttp-core


License

License

Categories

Categories

Net React User Interface Web Frameworks
GroupId

GroupId

net.reactivecore
ArtifactId

ArtifactId

fhttp-core_2.12
Last Version

Last Version

0.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

fhttp-core
fhttp-core
Project URL

Project URL

https://github.com/reactivecore/fhttp
Project Organization

Project Organization

net.reactivecore
Source Code Management

Source Code Management

https://github.com/reactivecore/fhttp

Download fhttp-core_2.12

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.13
com.chuusai : shapeless_2.12 jar 2.3.4
io.circe : circe-generic_2.12 jar 0.13.0
io.circe : circe-parser_2.12 jar 0.13.0

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar 3.0.9

Project Modules

There are no modules declared in this project.

fhttp, functional Http-Api definition in Scala

fhttp is a little proof of concept, whether it's possible to define a HTTP-API in a functional manner without binding directly to a framework.

From the definition it should be possible to generate Server and Client implementations without that much boilerplate.

The definition should not have any dependencies to the Server/Client library.

Current State

This is a proof of concept. Although it works, expect bugs everywhere. There are no published packages.

How it works

Each ApiCall instance is made of various transitions, stored in a full typed shapeless HList.

The Framework Implementation (at the moment only Akka HTTP) lifts this list into an Encoder / Decoder for HTTP-Requests and their response.

Parts

  • core Definition system
  • akka Implementation for Akka HTTP
  • example A simple Example

Features

  • Support for path adding/extracting
  • Support for Circe JSON, Strings
  • Support for async file upload and download
  • Support Query Parameters.
  • Elegant transport for errors in error responses.

TODO

  • Testing
  • Better error handling
  • Better path handling
  • More HTTP Methods (right now only GET, POST and DELETE)
  • Support for optional values
  • Improved conversion routines (e.g. Boolean query parameters)
  • Get rid of VTree if possible.
  • Reduce number of Future mappings if possible.
  • Extending
  • Multi part decoding on Akka Server side buffers the request in Memory.
net.reactivecore

Reactive Core GmbH

Versions

Version
0.3.0
0.2.2
0.2.1
0.1.2