Skip to content

HTTP Code for multipart/form-data #8531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DonBakke opened this issue May 23, 2020 · 1 comment · Fixed by postmanlabs/postman-code-generators#265
Closed

HTTP Code for multipart/form-data #8531

DonBakke opened this issue May 23, 2020 · 1 comment · Fixed by postmanlabs/postman-code-generators#265
Assignees

Comments

@DonBakke
Copy link

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:

  1. Set the Content-Type request header value to "multipart/form-data; boundary="
  2. It helps if you have another request header, like Cookie.
  3. POST a request to a URL.
  4. Click on Code.
  5. Click on HTTP in the list of languages.
  6. 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

----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):

  • Native App
  • Postman Version 7.25.0
  • OS: Windows 10 Pro 1909
@DannyDainton
Copy link
Contributor

Closing this due to age and inactivity - If this is still an issue for you on the latest version, we can look at reopening it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants