guozilu 发表于 2015-5-4 16:34:31

获取不到response的值

web_add_header("Authorization", headervalue);
        web_custom_request("patch_2",
                "URL=http://koala/exam/api/response/patch/",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=http://koala/exam/session/2/#/examsailfish",
                "Snapshot=t14.inf",
                "Mode=HTML",
                "EncType=application/json; charset=UTF-8",
                "Body={\"current_item_id\":\"2012-T6-YYLJ-005\",\"current_sub_item_id\":\"\",\"current_group_id\":\"1\",\"current_section_id\":\"1\",\"instruction_read\":true,\"permit\":\"{id}\",\"time_spent\":5,\"update_time\":\"2015-04-30 15:26:13\",\"sections\":[{\"time_spent\":5,\"status\":\"current\",\"id\":\"1\"}],\"items\":[{\"id\":\"2012-T6-YYLJ-005\",\"type\":\"sc\",\"time_spent\":1,\"retry_count\":1,\"marked\":false,\"completed\":true,\"submitted\":false,\"answer\":{\"position\":\",\",\"value\":\"B\""
                "},\"timestamp\":1430378773608}],\"adaptive\":true}",
                EXTRARES,
                "Url=/exam/api/next/?_=1430378774592", "Referer=http://koala/exam/session/2/#/examsailfish", ENDITEM,
                LAST);

需要获取response的值,从Generation log中有response的值,但是用web_reg_save_param("ResponseBody", "LB=", "RB=", "Search=Body", LAST);获取始终为空,加上左右边界也获取不到,请各位赐教。

Generation log中有response的值如下:
****** Response Body For Transaction With Id 115 ******
{"content": {"option_shuffle": true, "options": [{"id": "D", "description": "\\u5174\\u8d77    \\u641c\\u7d22"}, {"id": "B", "description": "\\u53d1\\u6398    \\u641c\\u96c6"}, {"id": "A", "description": "\\u5174\\u8d77    \\u641c\\u96c6"}, {"id": "C", "description": "\\u53d1\\u6398    \\u641c\\u7d22"}], "stem": "\\u4e0b\\u5217\\u9009\\u9879\\u53ef\\u4ee5\\u66ff\\u6362\\u62ec\\u53f7\\u4e2d\\u8bcd\\u8bed\\u7684\\u662f\\uff08   \\uff09\\u3002 <br />\\u2460\\u5728\\u7b49\\u79bb\\u5b50\\u7535\\u89c6\\u673a\\u5e02\\u573a\\u5feb\\u901f\\u53d1\\u5c55\\u7684\\u80cc\\u666f\\u4e0b\\uff0c\\u4e3a\\u4e86\\u8fdb\\u4e00\\u6b65\\u6253\\u9020\\u4e2d\\u56fd\\u7b49\\u79bb\\u5b50\\u7535\\u89c6\\u673a\\u4ea7\\u4e1a\\u7684\\u7ade\\u4e89\\u4f18\\u52bf\\uff0c\\u5f62\\u6210\\u5b8c\\u6574\\u7684\\u672c\\u571f\\u5316\\u7684\\u914d\\u5957\\u4ea7\\u4e1a\\u94fe\\uff0c\\u76ee\\u524d\\u4ee5\\u56db\\u5ddd\\u957f\\u8679\\u7b49\\u79bb\\u5b50\\u663e\\u793a\\u5c4f\\u4e3a\\u6838\\u5fc3\\u7684\\u767e\\u4ebf\\u89c4\\u6a21\\u7b49\\u79bb\\u5b50\\u4ea7\\u4e1a\\u96c6\\u7fa4\\u6b63\\u5728\\u65e5\\u76ca\\uff08\\u5d1b\\u8d77\\uff09\\u3002<br />\\u2461\\u4e3a\\u4e86\\u5bfb\\u627e\\u7075\\u611f\\uff0c\\u5979\\u5927\\u80c6\\u5730\\u5230\\u56fd\\u5916\\uff08\\u641c\\u5bfb\\uff09\\u7d20\\u6750\\u3002<br />"}, "type": "sc", "id": "2012-T6-YYLJ-005", "point": 1}

saharaqs 发表于 2015-5-5 12:46:22

回放之后看回放的response里有没有。
关联函数的左右边界必须加,并且要确保正确。
页: [1]
查看完整版本: 获取不到response的值