Skip to content

Sending multipart/form-data results in the wrong request body #619

Description

@mourtisma

When sending a POST request and selecting multipart/form-data as the Content-Type in the Headers section, the request body is a request payload, with parameters separated by a boundary

When sending the same POST request with Postman for example, the Content-Type is multipart/form-data; boundary=<the boundary>, which splits the payload and finally sends the request body as form data parameters, readable by most clients

In the API console, this can be achieved by removing the Content-Type in the Headers section, and let the internal JavaScript taking care of building the header with the boundary automatically

=> Would it be possible, when we select Content-Type: multipart/form-data, to automatically add the boundary when the request is sent ?

Activity

  1. jarrodek commented on Nov 14, 2019

    @jarrodek
    Contributor

    Hi,
    Thank you for the issue report.

    Would it be possible, when we select Content-Type: multipart/form-data, to automatically add the boundary when the request is sent ?

    This is what should happen. If it doesn't it is a bug. I will take a look into this and will try to reproduce.

  2. self-assigned this
    on Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions