Skip to content

Latest commit

 

History

History
59 lines (51 loc) · 1.12 KB

File metadata and controls

59 lines (51 loc) · 1.12 KB

Elastos Echo Service

Summary

This repo provide a simple callback cache service.

Configure

Configure redis

spring.redis.host=localhost
spring.redis.port=6379
spring.redis.password=

Build with maven

In project directory, use maven command:

$uname mvn clean compile package

If there is build success, Then the package echo.service.api-0.0.1.jar will be in target directory.

Run

Copy echo.service.api-0.0.1.jar to your deploy directory. then use jar command to run this spring boot application.

$uname java -jar echo.service.api-0.0.1.jar

Usage

Save callback data for 1hour

HTTP: POST
URL: /api/1/ela_echo/{app_id}/{traceid}
HEADERS:
    Content-Type: application/json
data: post data
return:
    成功: {
        "status":200,
    }
    失败: {"status":400, "result":"Err msg"}

Get callback data

HTTP: GET
URL: /api/1/ela_echo/{app_id}/{traceid}
HEADERS:
    Content-Type: application/json
data: post data
return:
    成功: {
        "data": post data
        "status":200,
    }
    失败: {"status":400, "result":"Err msg"}