Friendly Serving HTTP Library

Friendly Serving HTTP Library.

License

License

GroupId

GroupId

com.clouway.fserve
ArtifactId

ArtifactId

testing
Last Version

Last Version

0.1.5
Release Date

Release Date

Type

Type

jar
Description

Description

Friendly Serving HTTP Library
Friendly Serving HTTP Library.
Project URL

Project URL

https://github.com/clouway/fserve
Source Code Management

Source Code Management

https://github.com/clouway/fserve

Download testing

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
com.clouway.fserve : fserve jar 0.1.5

Project Modules

There are no modules declared in this project.

FServe

A friendly API for serving HTTP http request (friendly http serving).

  fork = new TkFork(
            new FkRegex("/hello", new Take() {
                @Override
                public Response ack(Request request) throws IOException {
                    return new RsText("Hello !!!");
                }
            })
  );

Adding as dependency

In Gradle:

repositories {
  mavenCentral()
  maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

dependencies {
     compile 'com.clouway.fserve:fserve:0.1-SNAPSHOT'
}

In Maven:

 <dependency>
    <groupId>com.clouway.fserve</groupId>
    <artifactId>fserve</artifactId>
    <version>0.1-SNAPSHOT</version>
 </dependency>

Remarks: library will be available and in maven central after version 0.1 is released.

Adapters

  • Servlet API Adapter - provides a basic HTTP helper classes for calling fserve directly from the servlet API
private ServletApiSupport servletApiSupport;

@Override
public void init(ServletConfig servletConfig) throws ServletException {
  super.init(servletConfig);

  fork = new TkFork(
        new FkRegex("/hello", new Take() {
            @Override
            public Response ack(Request request) throws IOException {
                return new RsText("Hello !!!");
            }
    })
  );

  servletApiSupport = new ServletApiSupport(fork);
}


@Override
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
  servletApiSupport.serve(req, resp);
}

Additional Notes

Some ideas are taken from Takes framework, but with Servlet API support.

Contributing

If you would like to contribute code to fserve you can do so through GitHub by forking the repository and sending a pull request. When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also make sure your code compiles by running gradle clean build.

com.clouway.fserve

clouWay ood

Versions

Version
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1