添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
追风的显示器  ·  REST service ...·  4 天前    · 
深情的鸡蛋  ·  Connect-Rest ...·  4 天前    · 
完美的蟠桃  ·  How to use Bonita BPM ...·  5 天前    · 
近视的苦瓜  ·  [TypeScript] REST ...·  1 周前    · 
高大的毛衣  ·  React-admin - The ...·  2 月前    · 
腹黑的机器猫  ·  红旗Linux_百度百科·  1 年前    · 

Forum Discussion

lheller
Occasional Contributor
9 years ago

REST service multipart/mixed request problem

Hi!

I want to send the below multipart/mixed type of request from SoapUI but I am unable to add the Content-MD5 header to the second part of body. This header is needed, otherwise the request will fail.

My question is: How to add custom headers into a part of multipart request body?

Raw request taken from Fiddler, when response is OK:

POST http://srv2012r2:8080/simo/api/documents HTTP/1.1
...

Content-Type: multipart/mixed; boundary=19D523FB
Host: srv2012r2:8080
Content-Length: 11979
Expect: 100-continue


--19D523FB
Content-Type: application/json

{

"fields":[{"Key":"e9e269b9-867f-4cf6-946f-db49091cd52d","Value":"Simplest document ever.docx"}],

"storageappid":"d9ca0630-e4f8-4112-a411-ff04d89f2225"

}
--19D523FB
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="Simplest+document+ever.docx"
Content-MD5: EFV8OUymEQRJLoppzOjQ1w==

PK ! ߤÒlZ [Content_Types].xml ¢(  ´”ËnÂ0E÷•ú‘·Ub袪*‹>–-Ré{Vý’Ǽþ¾QU‘
...

--19D523FB--

  • lheller's avatar

    Attached you can find my solution to the problem.

    It is a JavaSript function implemetation of HTTP web request with fully customizable parameters and the call of function with needed parameters for this teststep.