vikititor
6 years agoContributor
how MOCK read request data from attachement
Hello,
exists some way, how to read this request in ReadyAPI MOCK service?
My AUT (Application under test) sends text file in POST. I need to return JSON with somem value form the text file.
But how to do that?
My RAW request looks like:
POST http://localhost:9000/rest/submit HTTP/1.1 Content-Type: multipart/form-data; boundary="----=_Part_2_1159636768.1573464138308" MIME-Version: 1.0 Content-Length: 132451 Host: localhost:9000 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_181) ------=_Part_2_1159636768.1573464138308 Content-Type: application/octet-stream; name=example1.tdf Content-Transfer-Encoding: binary Content-Disposition: form-data; name="example1.tdf"; filename="example1.tdf" 1.01:1431.02:03001.09:MBI20191107151008-IDE-000651.11:00.001.12:00.00
I must extract this string "MBI20191107151008-IDE-00065" from it = each time will have differed value. And then send his value to the AUT in JSON.
How to read it? It is even possible in Soapui?