You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When testing an API that requires multipart/form-data content, the Code tool display incorrect results for HTTP.
To Reproduce
Steps to reproduce the behavior:
Set the Content-Type request header value to "multipart/form-data; boundary="
It helps if you have another request header, like Cookie.
POST a request to a URL.
Click on Code.
Click on HTTP in the list of languages.
See error
Expected behavior
I expect the Cookie header and the Content-Header separated by CR/LF, but instead I see them concatenated.
I expect the boundary values used to separate each form-data value to have an extra "--" in front.
I expect the final boundary value to have an extra "--" at the end.
I also noticed that the Postman Console results look well formed and the boundary value used is very different from the Code. I would expect these to be in alignment.
Screenshots
Here is what my HTTP Code looks like:
POST /mvr/v101b6/mvsvc?profile_location=HNL2&status_code=20&trans_type_code=REGISTRATION&veh_type_code=AUTO HTTP/1.1
Host: tstapi.hnl.info
Cookie: TS01377eb4=016a2109af90c9a818a4bf82ff1c93535b00738a33b98eaad836c587a323129b32a765f55cda7fb6536aa9ca1f94a80e04d913269eContent-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Describe the bug
When testing an API that requires multipart/form-data content, the Code tool display incorrect results for HTTP.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the Cookie header and the Content-Header separated by CR/LF, but instead I see them concatenated.
I expect the boundary values used to separate each form-data value to have an extra "--" in front.
I expect the final boundary value to have an extra "--" at the end.
I also noticed that the Postman Console results look well formed and the boundary value used is very different from the Code. I would expect these to be in alignment.
Screenshots
Here is what my HTTP Code looks like:
POST /mvr/v101b6/mvsvc?profile_location=HNL2&status_code=20&trans_type_code=REGISTRATION&veh_type_code=AUTO HTTP/1.1
Host: tstapi.hnl.info
Cookie: TS01377eb4=016a2109af90c9a818a4bf82ff1c93535b00738a33b98eaad836c587a323129b32a765f55cda7fb6536aa9ca1f94a80e04d913269eContent-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="bodytype_code"
2DCP
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="color_major_code"
BLK
----WebKitFormBoundary7MA4YWxkTrZu0gW
App information (please complete the following information):
The text was updated successfully, but these errors were encountered: