我正在尝试获取gzip响应,为此我将这个节点发送到正文中。
<div class="test" style="background-color: #4A90E2;">
<div class="right">
<h6 style="transform:rotate(-90deg); color: white; margin-top:50px; margin-right:10px">
<i style="color:white; " class="fa fa-phone fa-1x" aria-hidden="true"></i> Service
</h6>
</div>
<div style="color:white;" class="left">
<h3 style="color:white !important;"> Text</h3>
<p style="margin-top:-20px;">sometext </p>
</div>
</div>=
它返回成功的回复,但未在$body['TPA_Extensions']['IntelliSellTransaction']['CompressResponse']['Value'] = "true";
中显示。在var_dump
中,它显示var_dump
。在下图中,它显示成功的响应。 Successful Response Image
有人能告诉我如何获得这些数据“H4sIAAAAAAAAALWS0WvbMBDG / 5VDe / BLbTkLY ......”
答案 0 :(得分:0)
对于请求测试步骤,请在下面的代码段中添加Script Assertion
:
//Check response is not empty
assert context.response
//Parse response and fetch required value
def cResponse = new XmlSlurper().parseText(context.response).'**'.find {it.name() == 'CompressedResponse'}?.text()
log.info "Extracted data : $cResponse"