aws-http

A fluent http client library for aws

License

License

Categories

Categories

AWS Container PaaS Providers
GroupId

GroupId

io.github.rishikeshdarandale
ArtifactId

ArtifactId

aws-http
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

aws-http
A fluent http client library for aws
Project URL

Project URL

https://rishikeshdarandale.github.io/aws-http/
Source Code Management

Source Code Management

https://github.com/rishikeshdarandale/aws-http

Download aws-http

How to add to project

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

Dependencies

runtime (3)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-databind jar 2.9.4
com.fasterxml.jackson.dataformat : jackson-dataformat-xml jar 2.9.4
org.glassfish.jersey.core : jersey-client jar 2.26

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 2.15.0

Project Modules

There are no modules declared in this project.

aws-http

Build Status codecov Codacy Badge

Maven Central Javadocs License MIT

A fluent http client library for aws

Requirement

  • java 8

Usage

Add the dependency to your project as below:

  • maven
<dependency>
  <groupId>io.github.rishikeshdarandale</groupId>
  <artifactId>aws-http</artifactId>
  <version>1.0.0</version>
<dependency>
  • gradle
dependencies {
  compile 'io.github.rishikeshdarandale:aws-http:1.0.0'
}

Here is example:

        MyClass myClassObject = new JdkRequest("https://www.somehost.com")
                .method(RequestMethod.GET)
                .path("/mypath")
                .queryParams("message", "hello*world")
                .header("Accept", "application/json")
                .header("Content-Type", "application/json")
                .body("{}")
                .sign(AwsSignParams("myAccessKey", "MySecretId", "es"))
                .execute()
                .getAs(MyClass.class);

aws-http is flexible library and you can use either of following http libraries:

  • jersey-client

Add jersey-client library to your project along with aws-http as below:

  • maven
<dependency>
  <groupId>io.github.rishikeshdarandale</groupId>
  <artifactId>aws-http</artifactId>
  <version>1.0.0</version>
<dependency>
<dependency>
  <groupId>org.glassfish.jersey.core</groupId>
  <artifactId>jersey-client</artifactId>
  <version>2.26</version>
  <scope>runtime</scope>
<dependency>
  • gradle
dependencies {
  compile 'io.github.rishikeshdarandale:aws-http:1.0.0'
  runtime 'org.glassfish.jersey.core:jersey-client:2.26'
}

Here is example:

        MyClass myClassObject = new JerseyRequest("https://www.somehost.com")
                .method(RequestMethod.GET)
                .path("/mypath")
                .queryParams("message", "hello*world")
                .header("Accept", "application/json")
                .header("Content-Type", "application/json")
                .body("{}")
                .sign(AwsSignParams("myAccessKey", "MySecretId", "es"))
                .execute()
                .getAs(MyClass.class);
  • http client

[WIP]

Contribute

Welcome! You can absolutely contribute to this project. Please fork the repository, make the necessary changes, validate and create a pull request.

Verify the build locally

./gradlew build

Versions

Version
1.0.1