An open API service indexing awesome lists of open source software.

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

A fluent http client library for aws
https://github.com/rishikeshdarandale/aws-http

aws-http-client http-client java

Last synced: 3 months ago
JSON representation

A fluent http client library for aws

Awesome Lists containing this project

README

        

# aws-http

[![Build Status](https://api.travis-ci.org/RishikeshDarandale/aws-http.svg?branch=master)](https://travis-ci.org/RishikeshDarandale/aws-http)
[![codecov](https://codecov.io/gh/RishikeshDarandale/aws-http/branch/master/graph/badge.svg)](https://codecov.io/gh/RishikeshDarandale/aws-http)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/03ab23fe4a264ab09b01e64df876b1b7)](https://www.codacy.com/app/RishikeshDarandale/aws-http?utm_source=github.com&utm_medium=referral&utm_content=RishikeshDarandale/aws-http&utm_campaign=Badge_Grade)

[![Maven Central](https://img.shields.io/maven-metadata/v/http/central.maven.org/maven2/io/github/rishikeshdarandale/aws-http/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22aws-http%22)
[![Javadocs](http://www.javadoc.io/badge/io.github.rishikeshdarandale/aws-http.svg)](http://www.javadoc.io/doc/io.github.rishikeshdarandale/aws-http)
[![License MIT](http://img.shields.io/badge/license-MIT-green.svg)](https://github.com/rishikeshdarandale/aws-http/blob/master/LICENSE)

A fluent http client library for aws

### Requirement

* java 8

### Usage

Add the dependency to your project as below:

* maven

```

io.github.rishikeshdarandale
aws-http
1.0.0

```

* 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

```

io.github.rishikeshdarandale
aws-http
1.0.0

org.glassfish.jersey.core
jersey-client
2.26
runtime

```

* 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
```