Class OperationRequestPartFactory
java.lang.Object
org.springframework.restdocs.operation.OperationRequestPartFactory
A factory for creating
OperationRequestParts.- Author:
- Andy Wilkinson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(String name, String submittedFileName, byte[] content, org.springframework.http.HttpHeaders headers) Creates a newOperationRequestPart.
-
Constructor Details
-
OperationRequestPartFactory
public OperationRequestPartFactory()
-
-
Method Details
-
create
public OperationRequestPart create(String name, String submittedFileName, byte[] content, org.springframework.http.HttpHeaders headers) Creates a newOperationRequestPart. The givenheaderswill be augmented to ensure that they always include aContent-Lengthheader if the part has any content.- Parameters:
name- the name of the partsubmittedFileName- the name of the file being submitted by the partcontent- the content of the partheaders- the headers of the part- Returns:
- the
OperationRequestPart
-