Skip to content

multipart/form-data PATCH request produces http-request snippet with no request body #933

Closed
@beuss

Description

@beuss

When documenting a multipart/form-data request using PATCH method, we end up with only headers in http-request snippet.
It looks like switch to multipart is only handled for PUT/POST (org.springframework.restdocs.http.HttpRequestSnippet#getRequestBody). Is there any reason for this? I didn't find any restriction about multipart and PATCH in https://datatracker.ietf.org/doc/html/rfc5789
Anyway, the restriction on PUT/POST looks like a little excessive, if body content is empty but we've parts, it's likely that we want those parts to be included in the generated snippet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions