CI Template Sample Client


In [ ]:
import json, requests

BASE = "http://localhost:3000/" # Local machine
# BASE = "http://192.168.99.100:3000/" # Local Docker instance
# BASE = "http://192.168.99.100:8080/cx/v1/" # Agent on Docker

def jprint(data):
    print(json.dumps(data, indent=4))
    
# Check status
res = requests.get(BASE, json=my_data)
jprint(res.json())

In [ ]:
my_data = {
    "message": "hi",
    "myNumber": 111222
}

res = requests.post(BASE + "echo", json=my_data)
cyjsJson = res.json()

jprint(cyjsJson)