Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xxlabaza/future-service
https://github.com/xxlabaza/future-service
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/xxlabaza/future-service
- Owner: xxlabaza
- License: apache-2.0
- Created: 2020-02-06T08:56:32.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-04T23:55:37.000Z (about 2 years ago)
- Last Synced: 2023-03-01T14:32:16.050Z (over 1 year ago)
- Language: Java
- Size: 75.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
This is a simple service for playing in the AWS ecosystem.
The service provides functionality for submitting an HTTP request to a remote service, which invokes once (in spite of the submits maybe several times), its response caches, and resend to a specified destination(s) (optional).
- POST /
-
Submits a new HTTP request. JSON payload explanation:
keydescriptiondefault
reqeust
an object, which describes an HTTP request
-
required
url
request's URL
-
required
method
HTTP method
GET
optional
headers
the headers of the reqeust
-
optional
body
request's payload
-
optional
sendTo
an object describes where to send request's response
-
optional
url
URL where send the response
-
optional
method
HTTP method
GET
optional
headers
the headers of the reqeust
-
optional
includeResponseHeaders
a flag, which indecates -true
if original response headers should be copied,false
otherwise
true
optional
A request body example:
{
"request": {
"url": "http://localhost:8989",
"method": "delete",
"headers": {
"Key1": "Value1",
"Key2": ["Value2", "Value3"]
},
"body": "Hello world"
},
"sendTo": {
"url": "localhost:9999/api",
"includeResponseHeaders": false
}
}
## Build docker image
```bash
$> ./mvnw clean package docker:build
```
## Package, verify and run
```bash
$> ./mvnw clean package verify; and java -jar target/future-service-1.1.1.jar
```