/naftis

Primary LanguageJavaEclipse Public License 2.0EPL-2.0

naftis

naftis is a simple service that can be used to test for instance a service mesh implementation.

It has a REST interface, see below for some example calls.

dockerize

replace v1 by the correct version:

docker build --tag=naftis:v1 --rm=true --build-arg JAR_FILE=target/naftis-0.0.1-SNAPSHOT.jar . 

run naftis:

docker run -p 8080:8080 naftis:v1

POST some commands:

curl -d '{"externalId":1,"command":"echo","message":"hello","sender":"me"}' -H "Accept: application/json" -H "Content-Type: application/json" -X POST http://localhost:8080/rest/commands

curl -d '{"externalId":1,"command":"egress_http","message":"hello","sender":"me"}' -H "Accept: application/json" -H "Content-Type: application/json" -X POST http://localhost:8080/rest/commands

// If curl or the os does not like ':
curl -d "{\"externalId\":1,\"command\":\"egress_http\",\"message\":\"hello\",\"sender\":\"me\"}" -H "Accept: application/json" -H "Content-Type: application/json" -X POST http://localhost:8080/rest/commands