• gejun's avatar
    first working CI · 79981559
    gejun authored
    Change-Id: I68c0cafba040debefd660c5213f21e6fc702a4a6
    79981559
client.py 302 Bytes
import json
import urllib2
data = { "message" : "hello world" }
request_json = json.dumps(data)
req = urllib2.Request("http://127.0.0.1:8000/EchoService/Echo")
try:
    response = urllib2.urlopen(req, request_json, 1)
    print response.read()
except urllib2.HTTPError as e:
    print e.exception.code