【发布时间】:2021-04-07 13:01:43
【问题描述】:
我正在尝试通过 post 方法将 yml 文件上传到 graphql 端点,并在 JMeter 中收到以下错误,
错误详情:
http状态码:400
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>BadRequestError: Missing multipart field ‘operations’ (https://github.com/jaydenseric/graphql-multipart-request-spec).<br> at Busboy.<anonymous> (/app/node_modules/graphql-upload/public/processRequest.js:329:11)<br> at Object.onceWrapper (events.js:421:28)<br> at Busboy.emit (events.js:327:22)<br> at Busboy.emit (/app/node_modules/busboy/lib/main.js:37:33)<br> at /app/node_modules/busboy/lib/types/multipart.js:304:17<br> at processTicksAndRejections (internal/process/task_queues.js:75:11)</pre>
</body>
</html>
在正文部分请求有效负载详细信息:
------file_upload_for_schema
Content-Disposition: form-data; name="operations"
{"operationName":"fSchemaCreate","variables":{"record":{"name":"jam_test","file":null}},"query":"mutation fSchemaCreate($record: CreateOnefSchemaInput!) {\n fSchemaCreate(record: $record) {\n recordId\n __typename\n }\n}\n"}
------file_upload_for_schema
Content-Disposition: form-data; name="map"
{"1":["variables.record.file"]}
------file_upload_for_schema
Content-Disposition: form-data; name="1"; filename="conferenceImage.yml"
Content-Type: application/x-yaml
------file_upload_for_schema--
我的应用程序的实际 UI 屏幕:
编辑后我仍然面临这个问题;
【问题讨论】:
标签: jmeter