Re: 怎么写rRest ful api测试脚本?参数如果是json格式怎么写?

Posted by WaitUntil on
URL: http://ngrinder.373.s1.nabble.com/rRest-ful-api-json-tp2223p2232.html

def json = '{"tenant_code":"XXX","user_name":"XX","password":"X","skip_duplicate_entries":true,"type":"0"}';
// 发起请求
HTTPResponse result = request.POST("<a href="http://192.XXX.XX.XXX:XXXX/XXX/XX/login">http://192.XXX.XX.XXX:XXXX/XXX/XX/login", json.getBytes(), headers());