spring-projects / spring-projects/spring-framework
Clarification on multipart/mixed usage and examples provided in docs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
I'm seeking clarification on this documentation snippet. It indicates "non-browser RESTful service scenarios for multipart/mixed but then provides example data inconsistent with a multipart/mixed request body requirements, specifically the header data for which the example is based on.
mixed bodies use the content-disposition header but the named properties are not required in the same way a form-data request requires these parameters.
Can you please document a valid example of how to use multipart/mixed without relying on these name parameters in the content-disposition header? Subsequently, can you point to the correct documentation to implement the same without the form-data name parameter?
You can also submit multipart requests from non-browser clients in a RESTful service scenario. The following example uses a file along with JSON:
POST /someUrl
Content-Type: multipart/mixed
--edt7Tfrdusa7r3lNQc79vXuhIIMlatb7PQg7Vp
Content-Disposition: form-data; name="meta-data"
Content-Type: application/json; charset=UTF-8
Content-Transfer-Encoding: 8bit
{
"name": "value"
}
--edt7Tfrdusa7r3lNQc79vXuhIIMlatb7PQg7Vp
Content-Disposition: form-data; name="file-data"; filename="file.properties"
Content-Type: text/xml
Content-Transfer-Encoding: 8bit
... File Data ...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.