background: in an application business, you need to upload an attachment file before you can submit an issue with the request
: 1, you cannot record a request to upload a file while recording using
Jmeter or LR. This request can only be viewed through fiddler, because it is not recorded and can only be constructed manually, but there is too little material on the web.
so I'm here to tidy up the memo Fiddler recorded the request header and body as below the two screenshot
body as above, note the header "content-type:multipart/form-data;boundary=--------- -ch2gi3ef1gl6ij5ch2gl6ij5ei4gl6 "and body each"-----------------------------"as delimiters, representing a form field; the last"---------- ch2gi3ef1gl6ij5ch2gl6ij5ei4gl6--"(Ends with"--") delimiter is the end boundary of the form field. From this I can see the request, the POST data has four form fields, the last one contains the name= "Filedate" (the value of this name can be determined by itself), filename= "Ff.txt", the red box is ff.txt in fact the contents of the file
"Go" jmeter and LR upload files and download