Skip to content

Commit 5601d49

Browse files
committed
add option to allow testing via ambassador
1 parent af5d8c5 commit 5601d49

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

util/api_tester/api-tester.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ def run(args):
163163
json=REST_request,
164164
headers=headers
165165
)
166+
else:
167+
response = requests.post(
168+
"http://"+args.host+":"+str(args.port)+args.ambassador_path+"/api/v0.1/predictions",
169+
json=REST_request,
170+
headers=headers
171+
)
172+
166173

167174
jresp = response.json()
168175

@@ -196,6 +203,7 @@ def run(args):
196203
parser.add_argument("-p","--prnt",action="store_true",help="Prints requests and responses")
197204
parser.add_argument("--oauth-key")
198205
parser.add_argument("--oauth-secret")
206+
parser.add_argument("--ambassador-path")
199207

200208
args = parser.parse_args()
201209

0 commit comments

Comments
 (0)