Trying to use http request sampler to invoke restful svc call and upload a file as multipart/form-data.
Here is the request log
POST [url removed]
POST data:
--EDHfpU--q5a4ZKL4ARKEcJCOmTF8P8b9
Content-Disposition: form-data; name=""; filename="10trxinput.tsv.gz"
Content-Type: multipart/form-data
<actual file content, not shown here>
--EDHfpU--q5a4ZKL4ARKEcJCOmTF8P8b9--
[no cookies]
Request Headers:
Connection: keep-alive
Content-Type: multipart/form-data;charset=UTF-8
Accept-Encoding: gzip,deflate,sdch
Content-Length: 1901
Host: [host removed]
User-Agent: Apache-HttpClient/4.2.3 (java 1.5)
Here is the response
Missing start boundary
And I tried the same request and same file in chrome extension Advanced Rest Client and captured the log. I found in the header and the payload, both of them have the same boundary value.
However in the request Jmeter made, the header doesn't have boundary parameter.
Any idea?
Request URL:
[URL removed]
Request Method:
POST
Status Code:
200 OK
- Request Headersview source
Accept:
*/*
Accept-Encoding:
gzip,deflate,sdch
Accept-Language:
en-US,en;q=0.8,zh-CN;q=0.6
Connection:
keep-alive
Content-Length:
1922
Content-Type:
multipart/form-data; boundary=----WebKitFormBoundaryBTKuZgvohaK68xRA
Cookie:[cookie removed]
Host:
[host removed]
Origin:
chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo
User-Agent:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
- Request Payload
- ------WebKitFormBoundaryBTKuZgvohaK68xRA
Content-Disposition: form-data; name="fileUpload"; filename="10trxinput.tsv.gz"
Content-Type: application/x-gzip
------WebKitFormBoundaryBTKuZgvohaK68xRA--