Forum Discussion

jdege's avatar
jdege
New Contributor
8 years ago

Is there a way to specify a custom Content-Disposition header, when uploading attachments?

 

In a REST project, is there a way to specify a custom Content-Disposition header, when uploading attachments?

 

I have a server that expects certain values that SoapUI isn't providing.

2 Replies

    • jdege's avatar
      jdege
      New Contributor

      I'm not trying to add a custom header to the request, I'm trying to customize the Content-Disposition header that is generated for each attached file.

       

      When I upload multiple files, SoapUI generates a Content-Disposition header that contains, among other things, the name of the file. I'm working with a web service that expects custom content.

       

      https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition

       

       

      POST /test.html HTTP/1.1
      Host: example.org
      Content-Type: multipart/form-data;boundary="boundary"
      
      --boundary
      Content-Disposition: form-data; name="field1"
      
      value1
      --boundary
      Content-Disposition: form-data; name="field2"; filename="example.txt"
      
      value2
      --boundary--
      Specifications