无法使用Groovy中的REST API下载Azure DevOps测试结果附件无法确定当前字符

pbwdgjma  于 2022-11-01  发布在  其他
关注(0)|答案(1)|浏览(138)

{"header":{"type":"auto_translation","ret_code":"error","time_cost":1272.0,"request_id":"4aea595e599e11edbdf7873537756946"},"message":"Translation error (20001), please retry later. Detail: RuntimeException - The length of source sentence is too long!!! - {\n "header": {\n "time_cost": 0.000379,\n "type": "auto_translation",\n "ret_code": "The length of source sentence is too long!!!"\n }\n}"}

rpppsulh

rpppsulh1#

在testManagementService中,我必须将内容类型更改为“应用程序/八位字节流”

def result = genericRestClient.get(
  **contentType: 'application/octet-stream',**
    uri: "${genericRestClient.getTfsUrl()}/${collection}/${project}/_apis/test/Runs/${runId}/Results/${resultId}/attachments/${attachId}?",

    headers: ['Content-Type': 'application/octet-stream'],
    query: ['api-version':'6.0-preview.1', 'expand': 'all']

相关问题