saurabhsharma09
11 years agoContributor
Update Content-Type in Attachment before submission
Hello,
After I attach a file to REST request and send it successfully, I am seeing name also along with Content Type in Raw request tab
and due to which i am not getting few expected parameter values in response.(As explained by the developer )
Ex:- Actual value:- Content-Type: image/png; name=2014-05-12_1220.png
Expected value:- Content-Type: image/png;
As i have not put name in Request attachment Content-Type ,I think it is getting appended automatically.
Is there any way to remove "name=2014-05-12_1220.png" from the Content-Type?
I am guessing this has to be done before request is submitted (through some groovy code in event handlers but not sure.)
Request is POST request with Media Type= multipart/form-data and Content-Disposition: form-data; in payload.
I've also added Attachment and Raw Request screenshot.
please help me in getting this resolved?
Regards,
Saurabh
After I attach a file to REST request and send it successfully, I am seeing name also along with Content Type in Raw request tab
and due to which i am not getting few expected parameter values in response.(As explained by the developer )
Ex:- Actual value:- Content-Type: image/png; name=2014-05-12_1220.png
Expected value:- Content-Type: image/png;
As i have not put name in Request attachment Content-Type ,I think it is getting appended automatically.
Is there any way to remove "name=2014-05-12_1220.png" from the Content-Type?
I am guessing this has to be done before request is submitted (through some groovy code in event handlers but not sure.)
Request is POST request with Media Type= multipart/form-data and Content-Disposition: form-data; in payload.
I've also added Attachment and Raw Request screenshot.
please help me in getting this resolved?
Regards,
Saurabh
Hi Dave,
Ah! OK, the port of 8080 was a bad choice, looks like you've got something on there already! Have a go with 9001 or something else until that 'address already in use' error goes away.
Regards,
Rup